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(ServerRequestInterface $request)

Sends the given HTTP request

Details

setOption(int $optionName, mixed $value)

Sets an option to be used by cURL.

Parameters

int $optionName

One of the CURLOPT_* constants

mixed $value

The value to set

ResponseInterface sendRequest(ServerRequestInterface $request)

Sends the given HTTP request

Parameters

ServerRequestInterface $request

Return Value

ResponseInterface

Exceptions

Exception
CurlEngineException