class JMediawikiHttp extends JHttp

HTTP client class for connecting to a MediaWiki instance.

Methods

__construct( Registry $options = null, JHttpTransport $transport = null)

Constructor.

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

Method to send the GET command to the server.

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

Method to send the POST command to the server.

Details

__construct( Registry $options = null, JHttpTransport $transport = null)

Constructor.

Parameters

Registry $options Client options object.
JHttpTransport $transport The HTTP transport object.

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

Method to send the GET command to the server.

Parameters

string $url Path to the resource.
array $headers An array of name-value pairs to include in the header of the request.
integer $timeout Read timeout in seconds.

Return Value

JHttpResponse

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

Method to send the POST command to the server.

Parameters

string $url Path to the resource.
mixed $data Either an associative array or a string to be sent with the request.
array $headers An array of name-value pairs to include in the header of the request
integer $timeout Read timeout in seconds.

Return Value

JHttpResponse