guzzle README

The project's README from github.com/guzzle/guzzle. As one markdown file: README.md.

Guzzle

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.

Installation

The recommended way to install Guzzle is through Composer.

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

$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

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.

guzzle (guzzle/guzzle)

Searching Database…

23.4K ·GitHub
What is this?Guzzle is an extensible PHP HTTP client library that makes it easy to send HTTP requests and trivial to integrate with web services.
Is it a library I code against, or a tool I run by itself?It is a library you install into your PHP project and call from your own code. Its simple interface covers query strings, POST requests, cookies, JSON uploads, and streaming large uploads and downloads.
How do I add it to a project?Install it through Composer, the PHP dependency manager. The documentation includes a Quick Start with examples for your first requests.
Which PHP versions does it support?The current release line is 8.2. A version guidance table in the README maps each release to its PHP requirement, with older lines reaching back to PHP 5.5.
Am I locked into cURL?No. Guzzle abstracts the HTTP transport away, so your code has no hard dependency on cURL, PHP streams, sockets, or non-blocking event loops and stays environment-agnostic.
Can it send asynchronous requests?Yes — synchronous and asynchronous requests go through the same interface, so you can go async without changing how you build requests.
Can I add custom behavior on top of the client?Yes. A middleware system lets you augment and compose client behavior, and the documentation covers handlers and middleware in detail.
Does it work together with other HTTP libraries?Yes. Guzzle implements PSR-7 interfaces for requests, responses, and streams and supports PSR-18, so it interoperates with other compatible HTTP clients.
Is commercial support available for companies?Yes. Guzzle is part of the Tidelift Subscription, where maintainers deliver commercial support and maintenance for the open source dependencies used to build applications.
What are similar projects?Slim, aiohttp, got, koa, requests, echo, ky, wuzz
Creator
guzzle
Size
13.2 MB
Stars
23.4K
Age
15y
Commits · 90 Days