Class yii\httpclient\CurlTransport

Inheritanceyii\httpclient\CurlTransport » yii\httpclient\Transport » yii\base\Component
Available since version2.0
Source Code

CurlTransport sends HTTP messages using Client URL Library (cURL)

Note: this transport requires PHP 'curl' extension installed.

For this transport, you may setup request options as cURL Options

Public Methods

Hide inherited methods

MethodDescriptionDefined By
batchSend() Performs multiple HTTP requests. yii\httpclient\CurlTransport
send() Performs given request. yii\httpclient\CurlTransport

Method Details

batchSend() public method

Performs multiple HTTP requests.

Particular transport may benefit from this method, allowing sending requests in parallel. This method accepts an array of the yii\httpclient\Request objects and returns an array of the yii\httpclient\Response objects. Keys of the response array correspond the ones from request array.

public yii\httpclient\Response[] batchSend ( array $requests )
$requests yii\httpclient\Request[]

Requests to perform.

return yii\httpclient\Response[]

Responses list.

throws yii\httpclient\Exception
send() public method

Performs given request.

public yii\httpclient\Response send ( $request )
$request yii\httpclient\Request

Request to be sent.

return yii\httpclient\Response

Response instance.

throws yii\httpclient\Exception

on failure.