Abstract Class yii\httpclient\Transport

Inheritanceyii\httpclient\Transport » yii\base\Component
Subclassesyii\httpclient\CurlTransport, yii\httpclient\StreamTransport
Available since version2.0

Transport performs actual HTTP request sending.

Public Methods

Hide inherited methods

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

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.

send() public abstract method

Performs given request.

public abstract 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.