https://github.com/guzzle/guzzle
Guzzle, an extensible PHP HTTP client
https://github.com/guzzle/guzzle
curl guzzle http-client httpclient php psr-7 requests webservices
Last synced: 28 days ago
JSON representation
Guzzle, an extensible PHP HTTP client
- Host: GitHub
- URL: https://github.com/guzzle/guzzle
- Owner: guzzle
- License: mit
- Created: 2011-02-28T02:44:05.000Z (over 15 years ago)
- Default Branch: 8.2
- Last Pushed: 2026-09-06T13:55:34.000Z (2 months ago)
- Last Synced: 2026-10-12T02:11:31.374Z (about 1 month ago)
- Topics: curl, guzzle, http-client, httpclient, php, psr-7, requests, webservices
- Language: PHP
- Homepage:
- Size: 13 MB
- Stars: 23,445
- Watchers: 431
- Forks: 2,390
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: docs/contributing/curl-connection-reuse.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Agents: AGENTS.md
- Claude: CLAUDE.md
Awesome Lists containing this project
- awesome-php-cn - 官网
- awesome-php - Guzzle - A comprehensive HTTP client. (Table of Contents / HTTP)
- awesome-projects - Guzzle - A comprehensive HTTP client. (PHP / HTTP)
- AWS-Guide - Guzzle
- awesome-php - Guzzle - 一个全面的HTTP客户端 (超文本传输协议 HTTP)
- awesome-php-cn - Guzzle - 全面的HTTP客户端. (目录 / HTTP客户端 HTTP Client)
- awesome-php - guzzle/guzzle - Guzzle, an extensible PHP HTTP client (Web / HTTP and Networking Clients)
- Blockchain-Guide - Guzzle
- Developer-Handbook - Guzzle
- Bioinformatics-Guide - Guzzle
- VSCode-Guide - Guzzle
- awesome-php - guzzle/guzzle - 一个完整的HTTP客户端 (HTTP)
- php-awesome - Guzzle - PHP HTTP client and webservice framework (类库 / HTTP/网络通信)
- awesome-http - Guzzle - activity/y/guzzle/guzzle) (Programming Languages / PHP)
- awesome-links - Guzzle
- awesome-php - Guzzle - A comprehensive HTTP client. (Table of Contents / HTTP)
- fucking-awesome-php - Guzzle - A comprehensive HTTP client. (Table of Contents / HTTP)
- awesome-github-star - guzzle
- awesome-php - Guzzle - extensible PHP HTTP client (MIT) (Table of Contents / Globalization)
- awesome-php - Guzzle - A comprehensive HTTP client. (Table of Contents / HTTP)
- my-awesome-starred - guzzle - Guzzle, an extensible PHP HTTP client (PHP)
README

# 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](https://getcomposer.org/).
```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](docs/quick-start.md).
## Documentation
- [Quick Start](docs/quick-start.md)
- [Overview](docs/overview.md)
- [Request Options](docs/request-options.md)
- [Uploading Data](docs/uploading-data.md)
- [Cookies](docs/cookies.md)
- [Exceptions](docs/exceptions.md)
- [Guzzle and PSR-7](docs/guzzle-and-psr-7.md)
- [Handlers](docs/handlers.md)
- [Middleware](docs/middleware.md)
- [Testing Guzzle Clients](docs/testing-guzzle-clients.md)
- [FAQ](docs/faq.md)
- [Package Ecosystem](docs/package-ecosystem.md)
- [Upgrade Guide](UPGRADING.md)
- [Changelog](CHANGELOG.md)
We use GitHub issues only to discuss bugs and new features. For support, use
[Stack Overflow](https://stackoverflow.com/questions/tagged/guzzle), the
[#guzzle](https://app.slack.com/client/T0D2S9JCT/CE6UAAKL4) channel on
[PHP-HTTP Slack](https://slack.httplug.io/), or
[Gitter](https://gitter.im/guzzle/guzzle).
## Security
If you discover a security vulnerability within this package, please send an
email to security@tidelift.com. 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](https://github.com/guzzle/guzzle/security/policy) for more
information.
## License
Guzzle is made available under the MIT License (MIT). Please see
[License File](LICENSE) 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.](https://tidelift.com/subscription/pkg/packagist-guzzlehttp-guzzle?utm_source=packagist-guzzlehttp-guzzle&utm_medium=referral&utm_campaign=enterprise&utm_term=repo)