Curl
in package
implements
ClientInterface
Uses
ParseHeadersTrait
HTTP client for the curl backend.
Adapted from the original Request/Response implementation.
Interfaces, Classes, Traits and Enums
- ClientInterface
Table of Contents
- HTTP_AUTH_SCHEMES = [\Horde\Http\Constants::AUTH_ANY => CURLAUTH_ANY, \Horde\Http\Constants::AUTH_BASIC => CURLAUTH_BASIC, \Horde\Http\Constants::AUTH_DIGEST => CURLAUTH_DIGEST, \Horde\Http\Constants::AUTH_GSSNEGOTIATE => CURLAUTH_GSSNEGOTIATE, \Horde\Http\Constants::AUTH_NTLM => CURLAUTH_NTLM]
- Map of HTTP authentication schemes from Horde_Http constants to HTTP_AUTH constants.
- $options : Options
- $parsedCode : mixed
- Catch a parsed http return code
- $parsedHttpVersion : mixed
- $responseFactory : ResponseFactoryInterface
- $streamFactory : StreamFactoryInterface
- __construct() : mixed
- sendRequest() : ResponseInterface
- httpAuthScheme() : const
- Translate Constants::AUTH_* constant to CURLAUTH_*
- parseHeaders() : mixed
- Parse a string or array of strings into a set of headers
Constants
HTTP_AUTH_SCHEMES
Map of HTTP authentication schemes from Horde_Http constants to HTTP_AUTH constants.
private
array<string|int, mixed>
HTTP_AUTH_SCHEMES
= [\Horde\Http\Constants::AUTH_ANY => CURLAUTH_ANY, \Horde\Http\Constants::AUTH_BASIC => CURLAUTH_BASIC, \Horde\Http\Constants::AUTH_DIGEST => CURLAUTH_DIGEST, \Horde\Http\Constants::AUTH_GSSNEGOTIATE => CURLAUTH_GSSNEGOTIATE, \Horde\Http\Constants::AUTH_NTLM => CURLAUTH_NTLM]
Properties
$options
private
Options
$options
$parsedCode
Catch a parsed http return code
private
mixed
$parsedCode
= null
Some clients like fopen rely on this.
$parsedHttpVersion
private
mixed
$parsedHttpVersion
= null
$responseFactory
private
ResponseFactoryInterface
$responseFactory
$streamFactory
private
StreamFactoryInterface
$streamFactory
Methods
__construct()
public
__construct(ResponseFactoryInterface $responseFactory, StreamFactoryInterface $streamFactory, Options $options) : mixed
Parameters
- $responseFactory : ResponseFactoryInterface
- $streamFactory : StreamFactoryInterface
- $options : Options
Return values
mixed —sendRequest()
public
sendRequest(RequestInterface $request) : ResponseInterface
Parameters
- $request : RequestInterface
Return values
ResponseInterface —httpAuthScheme()
Translate Constants::AUTH_* constant to CURLAUTH_*
protected
httpAuthScheme(mixed $httpAuthScheme) : const
Parameters
- $httpAuthScheme : mixed
Tags
Return values
const —parseHeaders()
Parse a string or array of strings into a set of headers
private
parseHeaders(mixed $headers) : mixed
We might move this to a trait
Parameters
- $headers : mixed