1
0
mirror of https://github.com/guzzle/guzzle.git synced 2025-02-24 01:53:58 +01:00
guzzle/docs/index.rst
Michael Dowling ebf4e533d1 Renaming "options" to "config" for the config request option
Adding request and response docs
2014-02-16 17:10:57 -08:00

72 lines
1.7 KiB
ReStructuredText

.. title:: Guzzle | PHP HTTP client and framework for consuming RESTful web services
======
Guzzle
======
Guzzle is a PHP HTTP client that makes it easy to work with HTTP/1.1 and takes
the pain out of consuming web services.
- Pluggable HTTP adapters that can send requests serially or in parallel
- Doesn't require cURL, but uses cURL by default
- Streams data for both uploads and downloads
- Provides event hooks & plugins for cookies, caching, logging, OAuth, mocks, etc...
- Keep-Alive & connection pooling
- SSL Verification
- Automatic decompression of response bodies
- Streaming multipart file uploads
- Connection timeouts
.. code-block:: php
$client = new GuzzleHttp\Client();
$response = $client->get('http://guzzlephp.org');
$res = $client->get('https://api.github.com/user', ['auth' => ['user', 'pass']]);
echo $res->statusCode();
// 200
echo $res->getHeader('content-type');
// 'application/json; charset=utf8'
echo $res->getBody();
// {"type":"User"...'
var_export($res->json());
// Outputs the JSON decoded data
User guide
----------
.. toctree::
:maxdepth: 2
overview
quickstart
clients
http-messages
events
streams
faq
Libraries
---------
There are a number of libraries that can be used on top of or alongside
Guzzle. Here is a list of components that makeup Guzzle itself, official
libraries provided by the Guzzle organization, and commonly used libraries
provided by third party developers.
.. toctree::
:maxdepth: 2
libraries/components
libraries/guzzle
libraries/guzzle-service
libraries/third-party
API Documentation
-----------------
.. toctree::
:maxdepth: 2
api
migrating-to-4