Skip to content

Unix socket handler for guzzle 6. (deprecated since cURL 7.40.0)

License

Notifications You must be signed in to change notification settings

psrebniak/guzzle-socket-handler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Guzzle Socket Handler Build Status Code Climate

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
        ]]]
    )
]); 

Request options (from \psrebniak\GuzzleSocketHandler\SocketOptions)

  • SOCKET_TIMEOUT - alias of RequestOptions::CONNECT_TIMEOUT
  • SOCKET_DEBUG - alias of RequestOptions::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)

About

Unix socket handler for guzzle 6. (deprecated since cURL 7.40.0)

Resources

License

Stars

Watchers

Forks

Packages

No packages published