Edit File by line
/home/barbar84/public_h.../wp-conte.../plugins/updraftp.../vendor/guzzleht.../guzzle
File: README.md
Guzzle, PHP HTTP client
[0] Fix | Delete
=======================
[1] Fix | Delete
[2] Fix | Delete
[![Latest Version](https://img.shields.io/github/release/guzzle/guzzle.svg?style=flat-square)](https://github.com/guzzle/guzzle/releases)
[3] Fix | Delete
[![Build Status](https://img.shields.io/travis/guzzle/guzzle.svg?style=flat-square)](https://travis-ci.org/guzzle/guzzle)
[4] Fix | Delete
[![Total Downloads](https://img.shields.io/packagist/dt/guzzlehttp/guzzle.svg?style=flat-square)](https://packagist.org/packages/guzzlehttp/guzzle)
[5] Fix | Delete
[6] Fix | Delete
Guzzle is a PHP HTTP client that makes it easy to send HTTP requests and
[7] Fix | Delete
trivial to integrate with web services.
[8] Fix | Delete
[9] Fix | Delete
- Simple interface for building query strings, POST requests, streaming large
[10] Fix | Delete
uploads, streaming large downloads, using HTTP cookies, uploading JSON data,
[11] Fix | Delete
etc...
[12] Fix | Delete
- Can send both synchronous and asynchronous requests using the same interface.
[13] Fix | Delete
- Uses PSR-7 interfaces for requests, responses, and streams. This allows you
[14] Fix | Delete
to utilize other PSR-7 compatible libraries with Guzzle.
[15] Fix | Delete
- Abstracts away the underlying HTTP transport, allowing you to write
[16] Fix | Delete
environment and transport agnostic code; i.e., no hard dependency on cURL,
[17] Fix | Delete
PHP streams, sockets, or non-blocking event loops.
[18] Fix | Delete
- Middleware system allows you to augment and compose client behavior.
[19] Fix | Delete
[20] Fix | Delete
```php
[21] Fix | Delete
$client = new \GuzzleHttp\Client();
[22] Fix | Delete
$response = $client->request('GET', 'https://api.github.com/repos/guzzle/guzzle');
[23] Fix | Delete
[24] Fix | Delete
echo $response->getStatusCode(); # 200
[25] Fix | Delete
echo $response->getHeaderLine('content-type'); # 'application/json; charset=utf8'
[26] Fix | Delete
echo $response->getBody(); # '{"id": 1420053, "name": "guzzle", ...}'
[27] Fix | Delete
[28] Fix | Delete
# Send an asynchronous request.
[29] Fix | Delete
$request = new \GuzzleHttp\Psr7\Request('GET', 'http://httpbin.org');
[30] Fix | Delete
$promise = $client->sendAsync($request)->then(function ($response) {
[31] Fix | Delete
echo 'I completed! ' . $response->getBody();
[32] Fix | Delete
});
[33] Fix | Delete
[34] Fix | Delete
$promise->wait();
[35] Fix | Delete
```
[36] Fix | Delete
[37] Fix | Delete
## Help and docs
[38] Fix | Delete
[39] Fix | Delete
- [Documentation](http://guzzlephp.org/)
[40] Fix | Delete
- [Stack Overflow](http://stackoverflow.com/questions/tagged/guzzle)
[41] Fix | Delete
- [Gitter](https://gitter.im/guzzle/guzzle)
[42] Fix | Delete
[43] Fix | Delete
[44] Fix | Delete
## Installing Guzzle
[45] Fix | Delete
[46] Fix | Delete
The recommended way to install Guzzle is through
[47] Fix | Delete
[Composer](http://getcomposer.org).
[48] Fix | Delete
[49] Fix | Delete
```bash
[50] Fix | Delete
# Install Composer
[51] Fix | Delete
curl -sS https://getcomposer.org/installer | php
[52] Fix | Delete
```
[53] Fix | Delete
[54] Fix | Delete
Next, run the Composer command to install the latest stable version of Guzzle:
[55] Fix | Delete
[56] Fix | Delete
```bash
[57] Fix | Delete
composer require guzzlehttp/guzzle
[58] Fix | Delete
```
[59] Fix | Delete
[60] Fix | Delete
After installing, you need to require Composer's autoloader:
[61] Fix | Delete
[62] Fix | Delete
```php
[63] Fix | Delete
require 'vendor/autoload.php';
[64] Fix | Delete
```
[65] Fix | Delete
[66] Fix | Delete
You can then later update Guzzle using composer:
[67] Fix | Delete
[68] Fix | Delete
```bash
[69] Fix | Delete
composer update
[70] Fix | Delete
```
[71] Fix | Delete
[72] Fix | Delete
[73] Fix | Delete
## Version Guidance
[74] Fix | Delete
[75] Fix | Delete
| Version | Status | Packagist | Namespace | Repo | Docs | PSR-7 | PHP Version |
[76] Fix | Delete
|---------|------------|---------------------|--------------|---------------------|---------------------|-------|-------------|
[77] Fix | Delete
| 3.x | EOL | `guzzle/guzzle` | `Guzzle` | [v3][guzzle-3-repo] | [v3][guzzle-3-docs] | No | >= 5.3.3 |
[78] Fix | Delete
| 4.x | EOL | `guzzlehttp/guzzle` | `GuzzleHttp` | [v4][guzzle-4-repo] | N/A | No | >= 5.4 |
[79] Fix | Delete
| 5.x | EOL | `guzzlehttp/guzzle` | `GuzzleHttp` | [v5][guzzle-5-repo] | [v5][guzzle-5-docs] | No | >= 5.4 |
[80] Fix | Delete
| 6.x | Latest | `guzzlehttp/guzzle` | `GuzzleHttp` | [v6][guzzle-6-repo] | [v6][guzzle-6-docs] | Yes | >= 5.5 |
[81] Fix | Delete
[82] Fix | Delete
[guzzle-3-repo]: https://github.com/guzzle/guzzle3
[83] Fix | Delete
[guzzle-4-repo]: https://github.com/guzzle/guzzle/tree/4.x
[84] Fix | Delete
[guzzle-5-repo]: https://github.com/guzzle/guzzle/tree/5.3
[85] Fix | Delete
[guzzle-6-repo]: https://github.com/guzzle/guzzle
[86] Fix | Delete
[guzzle-3-docs]: http://guzzle3.readthedocs.org
[87] Fix | Delete
[guzzle-5-docs]: http://guzzle.readthedocs.org/en/5.3/
[88] Fix | Delete
[guzzle-6-docs]: http://guzzle.readthedocs.org/en/latest/
[89] Fix | Delete
[90] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function