Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
G

guzzle

> 开发工具
Open source

Guzzle, an extensible PHP HTTP client

23.5K stars0 likes3 views
WebsiteGitHub

About

Guzzle, an extensible PHP HTTP client

Guzzle, PHP HTTP Client

Guzzle is a PHP HTTP client that makes it easy to send HTTP requests and trivial to integrate with web services.

  • Simple interface for building query strings, POST requests, streaming large uploads, streaming large downloads, using HTTP cookies, uploading JSON data, etc...
  • Can send both synchronous and asynchronous requests using the same interface.
  • Uses PSR-7 interfaces for requests, responses, and streams. This allows you to utilize other PSR-7 compatible libraries with Guzzle.
  • Supports PSR-18, allowing interoperability with other PSR-18 HTTP clients.
  • Abstracts away the underlying HTTP transport, allowing you to write environment and transport agnostic code; i.e., no hard dependency on cURL, PHP streams, sockets, or non-blocking event loops.
  • Middleware system allows you to augment and compose client behavior.

Installation

The recommended way to install Guzzle is through Composer.

bash
composer require guzzlehttp/guzzle

Version Guidance

Version Status PHP Version
8.2 Latest >=7.4,<8.7
7.15 Maintenance >=7.2.5,<8.7
6.5 End of Life >=5.5,<8.0

Quick Start

php
$client = new \GuzzleHttp\Client();
$response = $client->request('GET', 'https://api.example.com/users/123');

echo $response->getStatusCode(); // 200
echo $response->getHeaderLine('content-type'); // 'application/json'
echo $response->getBody(); // '{"id": 123, "name": "Ada"}'

For more examples, see the Quick Start.

Documentation

  • Quick Start
  • Overview
  • Request Options
  • Uploading Data
  • Cookies
  • Exceptions
  • Guzzle and PSR-7
  • Handlers
  • Middleware
  • Testing Guzzle Clients
  • FAQ
  • Package Ecosystem
  • Upgrade Guide
  • Changelog

We use GitHub issues only to discuss bugs and new features. For support, use Stack Overflow, the #guzzle channel on PHP-HTTP Slack, or Gitter.

Security

If you discover a security vulnerability within this package, please send an email to [email protected]. All security vulnerabilities will be promptly addressed. Please do not disclose security-related issues publicly until a fix has been announced. Please see Security Policy for more information.

License

Guzzle is made available under the MIT License (MIT). Please see License File for more information.

For Enterprise

Available as part of the Tidelift Subscription

The maintainers of Guzzle and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. Learn more.

Issues· 1 open

View all issuesOpen on GitHub
  • #3886

    Decompose Utils into focused APIs and internal services

    kind/enhancementkind/tech-debtUpdated Aug 5, 2026

> Tags

PHPcurlguzzlehttp-clienthttpclient

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 30, 2026
Category开发工具
PricingOpen source

> Related tools

V
VS Code
流行的开源代码编辑器
G
Git
分布式版本控制系统
V
Vite
下一代前端构建工具