~ballot/wordpress/openstack-objectstorage

« back to all changes in this revision

Viewing changes to vendor/guzzlehttp/guzzle/README.md

  • Committer: Benjamin Allot
  • Date: 2020-07-02 16:31:38 UTC
  • Revision ID: benjamin.allot@canonical.com-20200702163138-qyk6njanak5uw2pg
Revert to revno 3

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
Guzzle, PHP HTTP client and webservice framework
2
2
================================================
3
3
 
4
 
[![Build Status](https://secure.travis-ci.org/guzzle/guzzle.svg?branch=master)](http://travis-ci.org/guzzle/guzzle)
5
 
 
6
 
Guzzle is a PHP HTTP client that makes it easy to send HTTP requests and
7
 
trivial to integrate with web services.
8
 
 
9
 
- Manages things like persistent connections, represents query strings as
10
 
  collections, simplifies sending streaming POST requests with fields and
11
 
  files, and abstracts away the underlying HTTP transport layer.
12
 
- Can send both synchronous and asynchronous requests using the same interface
13
 
  without requiring a dependency on a specific event loop.
14
 
- Pluggable HTTP adapters allows Guzzle to integrate with any method you choose
15
 
  for sending HTTP requests over the wire (e.g., cURL, sockets, PHP's stream
16
 
  wrapper, non-blocking event loops like ReactPHP.
17
 
- Guzzle makes it so that you no longer need to fool around with cURL options,
18
 
  stream contexts, or sockets.
 
4
[![Build Status](https://secure.travis-ci.org/guzzle/guzzle.png?branch=master)](http://travis-ci.org/guzzle/guzzle)
 
5
 
 
6
Guzzle is a PHP HTTP client that makes it easy to work with HTTP/1.1 and takes
 
7
the pain out of consuming web services.
19
8
 
20
9
```php
21
10
$client = new GuzzleHttp\Client();
29
18
// {"type":"User"...'
30
19
var_export($res->json());
31
20
// Outputs the JSON decoded data
32
 
 
33
 
// Send an asynchronous request.
34
 
$req = $client->createRequest('GET', 'http://httpbin.org', ['future' => true]);
35
 
$client->send($req)->then(function ($response) {
36
 
    echo 'I completed! ' . $response;
37
 
});
38
21
```
39
22
 
 
23
- Pluggable HTTP adapters that can send requests serially or in parallel
 
24
- Doesn't require cURL, but uses cURL by default
 
25
- Streams data for both uploads and downloads
 
26
- Provides event hooks & plugins for cookies, caching, logging, OAuth, mocks,
 
27
  etc.
 
28
- Keep-Alive & connection pooling
 
29
- SSL Verification
 
30
- Automatic decompression of response bodies
 
31
- Streaming multipart file uploads
 
32
- Connection timeouts
 
33
 
40
34
Get more information and answers with the
41
35
[Documentation](http://guzzlephp.org/),
42
36
[Forums](https://groups.google.com/forum/?hl=en#!forum/guzzle),
43
 
and [Gitter](https://gitter.im/guzzle/guzzle).
 
37
and IRC ([#guzzlephp](irc://irc.freenode.net/#guzzlephp) @ irc.freenode.net).
44
38
 
45
39
### Installing via Composer
46
40
 
52
46
curl -sS https://getcomposer.org/installer | php
53
47
```
54
48
 
55
 
Next, run the Composer command to install the latest stable version of Guzzle:
 
49
Next, update your project's composer.json file to include Guzzle:
56
50
 
57
 
```bash
58
 
composer.phar require guzzlehttp/guzzle
 
51
```javascript
 
52
{
 
53
    "require": {
 
54
        "guzzlehttp/guzzle": "~4.0"
 
55
    }
 
56
}
59
57
```
60
58
 
61
59
After installing, you need to require Composer's autoloader: