Línea 25... |
Línea 25... |
25 |
- Function `GuzzleHttp\Exception\ConnectException::hasResponse()` is removed.
|
25 |
- Function `GuzzleHttp\Exception\ConnectException::hasResponse()` is removed.
|
26 |
- Constant `GuzzleHttp\ClientInterface::VERSION` is removed. Added `GuzzleHttp\ClientInterface::MAJOR_VERSION` instead.
|
26 |
- Constant `GuzzleHttp\ClientInterface::VERSION` is removed. Added `GuzzleHttp\ClientInterface::MAJOR_VERSION` instead.
|
27 |
- Function `GuzzleHttp\Exception\RequestException::getResponseBodySummary` is removed.
|
27 |
- Function `GuzzleHttp\Exception\RequestException::getResponseBodySummary` is removed.
|
28 |
Use `\GuzzleHttp\Psr7\get_message_body_summary` as an alternative.
|
28 |
Use `\GuzzleHttp\Psr7\get_message_body_summary` as an alternative.
|
29 |
- Function `GuzzleHttp\Cookie\CookieJar::getCookieValue` is removed.
|
29 |
- Function `GuzzleHttp\Cookie\CookieJar::getCookieValue` is removed.
|
30 |
- Request option `exception` is removed. Please use `http_errors`.
|
30 |
- Request option `exceptions` is removed. Please use `http_errors`.
|
31 |
- Request option `save_to` is removed. Please use `sink`.
|
31 |
- Request option `save_to` is removed. Please use `sink`.
|
32 |
- Pool option `pool_size` is removed. Please use `concurrency`.
|
32 |
- Pool option `pool_size` is removed. Please use `concurrency`.
|
33 |
- We now look for environment variables in the `$_SERVER` super global, due to thread safety issues with `getenv`. We continue to fallback to `getenv` in CLI environments, for maximum compatibility.
|
33 |
- We now look for environment variables in the `$_SERVER` super global, due to thread safety issues with `getenv`. We continue to fallback to `getenv` in CLI environments, for maximum compatibility.
|
34 |
- The `get`, `head`, `put`, `post`, `patch`, `delete`, `getAsync`, `headAsync`, `putAsync`, `postAsync`, `patchAsync`, and `deleteAsync` methods are now implemented as genuine methods on `GuzzleHttp\Client`, with strong typing. The original `__call` implementation remains unchanged for now, for maximum backwards compatibility, but won't be invoked under normal operation.
|
34 |
- The `get`, `head`, `put`, `post`, `patch`, `delete`, `getAsync`, `headAsync`, `putAsync`, `postAsync`, `patchAsync`, and `deleteAsync` methods are now implemented as genuine methods on `GuzzleHttp\Client`, with strong typing. The original `__call` implementation remains unchanged for now, for maximum backwards compatibility, but won't be invoked under normal operation.
|
35 |
- The `log` middleware will log the errors with level `error` instead of `notice`
|
35 |
- The `log` middleware will log the errors with level `error` instead of `notice`
|
Línea 187... |
Línea 187... |
187 |
$client = new GuzzleHttp\Client(['handler' => $handler]);
|
187 |
$client = new GuzzleHttp\Client(['handler' => $handler]);
|
188 |
```
|
188 |
```
|
Línea 189... |
Línea 189... |
189 |
|
189 |
|
Línea 190... |
Línea 190... |
190 |
## POST Requests
|
190 |
## POST Requests
|
191 |
|
191 |
|
192 |
This version added the [`form_params`](http://guzzle.readthedocs.org/en/latest/request-options.html#form_params)
|
192 |
This version added the [`form_params`](https://docs.guzzlephp.org/en/latest/request-options.html#form_params)
|
193 |
and `multipart` request options. `form_params` is an associative array of
|
193 |
and `multipart` request options. `form_params` is an associative array of
|
194 |
strings or array of strings and is used to serialize an
|
194 |
strings or array of strings and is used to serialize an
|
195 |
`application/x-www-form-urlencoded` POST request. The
|
195 |
`application/x-www-form-urlencoded` POST request. The
|
Línea 196... |
Línea 196... |
196 |
[`multipart`](http://guzzle.readthedocs.org/en/latest/request-options.html#multipart)
|
196 |
[`multipart`](https://docs.guzzlephp.org/en/latest/request-options.html#multipart)
|
197 |
option is now used to send a multipart/form-data POST request.
|
197 |
option is now used to send a multipart/form-data POST request.
|
Línea 207... |
Línea 207... |
207 |
4.x to 5.0
|
207 |
4.x to 5.0
|
208 |
----------
|
208 |
----------
|
Línea 209... |
Línea 209... |
209 |
|
209 |
|
Línea 210... |
Línea 210... |
210 |
## Rewritten Adapter Layer
|
210 |
## Rewritten Adapter Layer
|
211 |
|
211 |
|
212 |
Guzzle now uses [RingPHP](http://ringphp.readthedocs.org/en/latest) to send
|
212 |
Guzzle now uses [RingPHP](https://ringphp.readthedocs.org/en/latest) to send
|
213 |
HTTP requests. The `adapter` option in a `GuzzleHttp\Client` constructor
|
213 |
HTTP requests. The `adapter` option in a `GuzzleHttp\Client` constructor
|
214 |
is still supported, but it has now been renamed to `handler`. Instead of
|
214 |
is still supported, but it has now been renamed to `handler`. Instead of
|
Línea 573... |
Línea 573... |
573 |
|
573 |
|
574 |
You can intercept a request and inject a response using the `intercept()` event
|
574 |
You can intercept a request and inject a response using the `intercept()` event
|
575 |
of a `GuzzleHttp\Event\BeforeEvent`, `GuzzleHttp\Event\CompleteEvent`, and
|
575 |
of a `GuzzleHttp\Event\BeforeEvent`, `GuzzleHttp\Event\CompleteEvent`, and
|
Línea 576... |
Línea 576... |
576 |
`GuzzleHttp\Event\ErrorEvent` event.
|
576 |
`GuzzleHttp\Event\ErrorEvent` event.
|
Línea 577... |
Línea 577... |
577 |
|
577 |
|
Línea 578... |
Línea 578... |
578 |
See: http://docs.guzzlephp.org/en/latest/events.html
|
578 |
See: https://docs.guzzlephp.org/en/latest/events.html
|
579 |
|
579 |
|
Línea 666... |
Línea 666... |
666 |
|
666 |
|
Línea 667... |
Línea 667... |
667 |
## Service
|
667 |
## Service
|
Línea 668... |
Línea 668... |
668 |
|
668 |
|
669 |
The service description layer of Guzzle has moved into two separate packages:
|
669 |
The service description layer of Guzzle has moved into two separate packages:
|
670 |
|
670 |
|
671 |
- http://github.com/guzzle/command Provides a high level abstraction over web
|
671 |
- https://github.com/guzzle/command Provides a high level abstraction over web
|
672 |
services by representing web service operations using commands.
|
672 |
services by representing web service operations using commands.
|
Línea 673... |
Línea 673... |
673 |
- http://github.com/guzzle/guzzle-services Provides an implementation of
|
673 |
- https://github.com/guzzle/guzzle-services Provides an implementation of
|
Línea 868... |
Línea 868... |
868 |
* `Guzzle\Service\Command\CommandInterface` now extends from ToArrayInterface and ArrayAccess
|
868 |
* `Guzzle\Service\Command\CommandInterface` now extends from ToArrayInterface and ArrayAccess
|
Línea 869... |
Línea 869... |
869 |
|
869 |
|
870 |
3.3 to 3.4
|
870 |
3.3 to 3.4
|
Línea 871... |
Línea 871... |
871 |
----------
|
871 |
----------
|
Línea 872... |
Línea 872... |
872 |
|
872 |
|
873 |
Base URLs of a client now follow the rules of https://tools.ietf.org/html/rfc3986#section-5.2.2 when merging URLs.
|
873 |
Base URLs of a client now follow the rules of https://datatracker.ietf.org/doc/html/rfc3986#section-5.2.2 when merging URLs.
|
Línea 874... |
Línea 874... |
874 |
|
874 |
|