Guzzle Socket Handler
Warning
This package is deprecated since cURL 7.40.0.
Use curl_setopt
with CURLOPT_UNIX_SOCKET_PATH
option instead of this package (available in cURL 7.40.0 (PHP 7.0.7))
Unix socket handler for guzzle 6.
Installation
composer require psrebniak/guzzle-socket-handler
Usage:
\GuzzleHttp\Client([
'handler' => new \psrebniak\GuzzleSocketHandler\SocketHandlerFactory(
$path
[, $domain = AF_UNIX
[, $type = SOCK_STREAM
[, $protocol = SOL_SOCKET
]]]
)
]);
\psrebniak\GuzzleSocketHandler\SocketOptions
)
Request options (from SOCKET_TIMEOUT
- alias ofRequestOptions::CONNECT_TIMEOUT
SOCKET_DEBUG
- alias ofRequestOptions::DEBUG
Done:
- sending JSON (
$options[RequestOptions::JSON]
key) - sending form params (
$options[RequestOptions::FORM_PARAMS]
key) - sending multipart (
$options[RequestOptions::multipart]
key) - tracking redirects (
$options[RequestOptions::ALLOW_REDIRECTS]
key) - timeout (
$options[RequestOptions::CONNECT_TIMEOUT]
key) - Http Authentication (
$options[RequestOptions::AUTH]
key)