Joomla CMS  3.10.11 (avec JPlatform 13.1 inclus)
Documentation des API du CMS Joomla en version 3.10.11 et du framework Joomla Platform intégré
Référence de la classe Http

Fonctions membres publiques

 __construct (Registry $options=null, TransportInterface $transport=null)
 
 getOption ($key)
 
 setOption ($key, $value)
 
 options ($url, array $headers=null, $timeout=null)
 
 head ($url, array $headers=null, $timeout=null)
 
 get ($url, array $headers=null, $timeout=null)
 
 post ($url, $data, array $headers=null, $timeout=null)
 
 put ($url, $data, array $headers=null, $timeout=null)
 
 delete ($url, array $headers=null, $timeout=null)
 
 trace ($url, array $headers=null, $timeout=null)
 
 patch ($url, $data, array $headers=null, $timeout=null)
 

Attributs protégés

 $options
 
 $transport
 

Description détaillée

HTTP client class.

Depuis
1.7.3

Documentation des constructeurs et destructeur

◆ __construct()

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

Constructor.

Paramètres
Registry$optionsClient options object. If the registry contains any headers.* elements, these will be added to the request headers.
TransportInterface$transportThe HTTP transport object.
Depuis
1.7.3

Références $options, et HttpFactory\getAvailableDriver().

Documentation des fonctions membres

◆ delete()

delete (   $url,
array  $headers = null,
  $timeout = null 
)

Method to send the DELETE command to the server.

Paramètres
string$urlPath to the resource.
array$headersAn array of name-value pairs to include in the header of the request.
integer$timeoutRead timeout in seconds.
Renvoie
Response
Depuis
1.7.3

Références $key, $url, et null.

◆ get()

get (   $url,
array  $headers = null,
  $timeout = null 
)

Method to send the GET command to the server.

Paramètres
string$urlPath to the resource.
array$headersAn array of name-value pairs to include in the header of the request.
integer$timeoutRead timeout in seconds.
Renvoie
Response
Depuis
1.7.3

Références $key, $url, et null.

◆ getOption()

getOption (   $key)

Get an option from the HTTP client.

Paramètres
string$keyThe name of the option to get.
Renvoie
mixed The option value.
Depuis
1.7.3

Références $key.

◆ head()

head (   $url,
array  $headers = null,
  $timeout = null 
)

Method to send the HEAD command to the server.

Paramètres
string$urlPath to the resource.
array$headersAn array of name-value pairs to include in the header of the request.
integer$timeoutRead timeout in seconds.
Renvoie
Response
Depuis
1.7.3

Références $key, $url, et null.

◆ options()

options (   $url,
array  $headers = null,
  $timeout = null 
)

Method to send the OPTIONS command to the server.

Paramètres
string$urlPath to the resource.
array$headersAn array of name-value pairs to include in the header of the request.
integer$timeoutRead timeout in seconds.
Renvoie
Response
Depuis
1.7.3

Références $key, $url, et null.

◆ patch()

patch (   $url,
  $data,
array  $headers = null,
  $timeout = null 
)

Method to send the PATCH command to the server.

Paramètres
string$urlPath to the resource.
mixed$dataEither an associative array or a string to be sent with the request.
array$headersAn array of name-value pairs to include in the header of the request.
integer$timeoutRead timeout in seconds.
Renvoie
Response
Depuis
3.0.1

Références $data, $key, $url, et null.

◆ post()

post (   $url,
  $data,
array  $headers = null,
  $timeout = null 
)

Method to send the POST command to the server.

Paramètres
string$urlPath to the resource.
mixed$dataEither an associative array or a string to be sent with the request.
array$headersAn array of name-value pairs to include in the header of the request
integer$timeoutRead timeout in seconds.
Renvoie
Response
Depuis
1.7.3

Références $data, $key, $url, et null.

◆ put()

put (   $url,
  $data,
array  $headers = null,
  $timeout = null 
)

Method to send the PUT command to the server.

Paramètres
string$urlPath to the resource.
mixed$dataEither an associative array or a string to be sent with the request.
array$headersAn array of name-value pairs to include in the header of the request.
integer$timeoutRead timeout in seconds.
Renvoie
Response
Depuis
1.7.3

Références $data, $key, $url, et null.

◆ setOption()

setOption (   $key,
  $value 
)

Set an option for the HTTP client.

Paramètres
string$keyThe name of the option to set.
mixed$valueThe option value to set.
Renvoie
Http This object for method chaining.
Depuis
1.7.3

Références $key, et $value.

◆ trace()

trace (   $url,
array  $headers = null,
  $timeout = null 
)

Method to send the TRACE command to the server.

Paramètres
string$urlPath to the resource.
array$headersAn array of name-value pairs to include in the header of the request.
integer$timeoutRead timeout in seconds.
Renvoie
Response
Depuis
1.7.3

Références $key, $url, et null.

Documentation des champs

◆ $options

$options
protected

◆ $transport

$transport
protected

La documentation de cette classe a été générée à partir du fichier suivant :