class CurlEngine implements RequestEngineInterface (View source)

A Request Engine which uses cURL in order to send requests to external HTTP servers.

Properties

protected array $options

Methods

setOption(int $optionName, mixed $value)

Sets an option to be used by cURL.

ResponseInterface
sendRequest(RequestInterface $request)

Sends the given HTTP request

Details

setOption(int $optionName, mixed $value)

Sets an option to be used by cURL.

Setting headers is not allowed, please use request object.

Parameters

int $optionName

One of the CURLOPT_* constants

mixed $value

The value to set

Exceptions

InvalidArgumentException

ResponseInterface sendRequest(RequestInterface $request)

Sends the given HTTP request

Parameters

RequestInterface $request

Return Value

ResponseInterface

Exceptions

Exception
CurlEngineException