interface TransportInterface (View source)

The TransportInterface class.

Methods

__construct(array|ArrayAccess $options = array())

Constructor.

ResponseInterface
request(RequestInterface $request)

Send a request to the server and return a Response object with the response.

ResponseInterface
download(RequestInterface $request, string|StreamInterface $dest)

Use stream to download file.

static boolean
isSupported()

Method to check if HTTP transport layer available for using

Details

at line line 29
__construct(array|ArrayAccess $options = array())

Constructor.

Parameters

array|ArrayAccess $options Client options object.

at line line 40
ResponseInterface request(RequestInterface $request)

Send a request to the server and return a Response object with the response.

Parameters

RequestInterface $request The request object to store request params.

Return Value

ResponseInterface

at line line 51
ResponseInterface download(RequestInterface $request, string|StreamInterface $dest)

Use stream to download file.

Parameters

RequestInterface $request The request object to store request params.
string|StreamInterface $dest The dest path to store file.

Return Value

ResponseInterface

at line line 60
static boolean isSupported()

Method to check if HTTP transport layer available for using

Return Value

boolean True if available else false