JHttpTransport

HTTP transport class interface.

since

11.3

package

Joomla.Platform

Methods

__construct

Constructor.

__construct(\Joomla\Registry\Registry $options) 
since

11.3

Arguments

$options

\Joomla\Registry\RegistryClient options object.

isSupported

Method to check if HTTP transport is available for use

isSupported() : boolean
static
since

12.1

Response

booleanTrue if available else false

request

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

request(string $method, \JUri $uri, mixed $data = null, array $headers = null, integer $timeout = null, string $userAgent = null) : \JHttpResponse
since

11.3

Arguments

$method

stringThe HTTP method for sending the request.

$uri

\JUriThe 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

integerRead timeout in seconds.

$userAgent

stringThe optional user agent string to send with the request.

Response

\JHttpResponse