JMediawikiHttp

Extends \JHttp

HTTP client class for connecting to a MediaWiki instance.

since

3.1.4

package

Joomla.Platform

Methods

__construct

Constructor.

__construct(\Joomla\Registry\Registry $options = null, \JHttpTransport $transport = null) 
since

3.1.4

Arguments

$options

\Joomla\Registry\RegistryClient options object.

$transport

\JHttpTransportThe HTTP transport object.

get

Method to send the GET command to the server.

get(string $url, array $headers = null, integer $timeout = null) : \JHttpResponse
since

3.1.4

Arguments

$url

stringPath to the resource.

$headers

arrayAn array of name-value pairs to include in the header of the request.

$timeout

integerRead timeout in seconds.

Response

\JHttpResponse

post

Method to send the POST command to the server.

post(string $url, mixed $data, array $headers = null, integer $timeout = null) : \JHttpResponse
since

3.1.4

Arguments

$url

stringPath to the resource.

$data

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

$headers

arrayAn array of name-value pairs to include in the header of the request

$timeout

integerRead timeout in seconds.

Response

\JHttpResponse