Class JHttp

Description

HTTP client class.

  • since: 11.3

Located in /libraries/joomla/http/http.php (line 19)


	
			
Direct descendents
Class Description
 class JGithubHttp HTTP client class for connecting to a GitHub instance.
 class JMediawikiHttp HTTP client class for connecting to a MediaWiki instance.
Variable Summary
Method Summary
 JHttp __construct ([JRegistry $options = null], [JHttpTransport $transport = null])
 JHttpResponse delete (string $url, [array $headers = null], [integer $timeout = null])
 JHttpResponse get (string $url, [array $headers = null], [integer $timeout = null])
 mixed getOption (string $key)
 JHttpResponse head (string $url, [array $headers = null], [integer $timeout = null])
 JHttpResponse options (string $url, [array $headers = null], [integer $timeout = null])
 JHttpResponse patch (string $url, mixed $data, [array $headers = null], [integer $timeout = null])
 JHttpResponse post (string $url, mixed $data, [array $headers = null], [integer $timeout = null])
 JHttpResponse put (string $url, mixed $data, [array $headers = null], [integer $timeout = null])
 JHttp setOption (string $key, mixed $value)
 JHttpResponse trace (string $url, [array $headers = null], [integer $timeout = null])
Variables
JRegistry $options (line 25)
  • var: Options for the HTTP client.
  • since: 11.3
  • access: protected
JHttpTransport $transport (line 31)
  • var: The HTTP transport object to use in sending HTTP requests.
  • since: 11.3
  • access: protected
Methods
Constructor __construct (line 42)

Constructor.

  • since: 11.3
  • access: public
JHttp __construct ([JRegistry $options = null], [JHttpTransport $transport = null])
  • JRegistry $options: Client options object. If the registry contains any headers.* elements, these will be added to the request headers.
  • JHttpTransport $transport: The HTTP transport object.

Redefined in descendants as:
delete (line 257)

Method to send the DELETE command to the server.

  • since: 11.3
  • access: public
JHttpResponse delete (string $url, [array $headers = null], [integer $timeout = null])
  • 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.
get (line 156)

Method to send the GET command to the server.

  • since: 11.3
  • access: public
JHttpResponse get (string $url, [array $headers = null], [integer $timeout = null])
  • 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.

Redefined in descendants as:
getOption (line 57)

Get an option from the HTTP client.

  • return: The option value.
  • since: 11.3
  • access: public
mixed getOption (string $key)
  • string $key: The name of the option to get.
head (line 123)

Method to send the HEAD command to the server.

  • since: 11.3
  • access: public
JHttpResponse head (string $url, [array $headers = null], [integer $timeout = null])
  • 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.
options (line 90)

Method to send the OPTIONS command to the server.

  • since: 11.3
  • access: public
JHttpResponse options (string $url, [array $headers = null], [integer $timeout = null])
  • 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.
patch (line 324)

Method to send the PATCH command to the server.

  • since: 12.2
  • access: public
JHttpResponse patch (string $url, mixed $data, [array $headers = null], [integer $timeout = null])
  • 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.
post (line 190)

Method to send the POST command to the server.

  • since: 11.3
  • access: public
JHttpResponse post (string $url, mixed $data, [array $headers = null], [integer $timeout = null])
  • 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.

Redefined in descendants as:
put (line 224)

Method to send the PUT command to the server.

  • since: 11.3
  • access: public
JHttpResponse put (string $url, mixed $data, [array $headers = null], [integer $timeout = null])
  • 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.
setOption (line 72)

Set an option for the HTTP client.

  • return: This object for method chaining.
  • since: 11.3
  • access: public
JHttp setOption (string $key, mixed $value)
  • string $key: The name of the option to set.
  • mixed $value: The option value to set.
trace (line 290)

Method to send the TRACE command to the server.

  • since: 11.3
  • access: public
JHttpResponse trace (string $url, [array $headers = null], [integer $timeout = null])
  • 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.

Documentation generated on Tue, 19 Nov 2013 15:04:56 +0100 by phpDocumentor 1.4.3