TransportInterface

HTTP transport class interface.

since

1.7.3

package

Joomla CMS

Methods

__construct

Constructor.

__construct(\Joomla\Registry\Registry options) : mixed
since

1.7.3

Arguments

options

\Joomla\Registry\RegistryClient options object.

Response

mixed

isSupported

Method to check if HTTP transport is available for use

isSupported() : bool
static
since

3.0.0

Response

boolTrue if available else false

request

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

request(string method, \Joomla\CMS\Uri\Uri uri, mixed data = null, array headers = null, int timeout = null, string userAgent = null) : \Joomla\CMS\Http\Response
since

1.7.3

Arguments

method

stringThe HTTP method for sending the request.

uri

\Joomla\CMS\Uri\UriThe URI to the resource to request.

data

mixedEither an associative array or a string to be sent with the request.

headers

arrayAn array of request headers to send with the request.

timeout

intRead timeout in seconds.

userAgent

stringThe optional user agent string to send with the request.

Response

\Joomla\CMS\Http\Response