Liste de tous les membres
Fonctions membres publiques |
| __construct (JRegistry $options=null, JHttpTransport $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) |
Description détaillée
Définition à la ligne 19 du fichier http.php.
Documentation des constructeurs et destructeur
Documentation des fonctions membres
JHttp::delete |
( |
|
$url, |
|
|
array |
$headers = null , |
|
|
|
$timeout = null |
|
) |
| |
Method to send the DELETE command to the server.
- Paramètres:
-
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. |
- Renvoie:
- JHttpResponse
- Depuis:
- 11.3
Définition à la ligne 257 du fichier http.php.
{
$temp = (array) $this->
options->get(
'headers');
foreach ($temp as $key => $val)
{
if (!isset($headers[$key]))
{
$headers[$key] = $val;
}
}
if ($timeout === null && $this->
options->exists(
'timeout'))
{
$timeout = $this->
options->get(
'timeout');
}
return $this->transport->request(
'DELETE',
new JUri($url), null, $headers, $timeout, $this->
options->get(
'userAgent', null));
}
JHttp::get |
( |
|
$url, |
|
|
array |
$headers = null , |
|
|
|
$timeout = null |
|
) |
| |
Method to send the GET command to the server.
- Paramètres:
-
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. |
- Renvoie:
- JHttpResponse
- Depuis:
- 11.3
Définition à la ligne 156 du fichier http.php.
{
$temp = (array) $this->
options->get(
'headers');
foreach ($temp as $key => $val)
{
if (!isset($headers[$key]))
{
$headers[$key] = $val;
}
}
if ($timeout === null && $this->
options->exists(
'timeout'))
{
$timeout = $this->
options->get(
'timeout');
}
return $this->transport->request(
'GET',
new JUri($url), null, $headers, $timeout, $this->
options->get(
'userAgent', null));
}
Get an option from the HTTP client.
- Paramètres:
-
string | $key | The name of the option to get. |
- Renvoie:
- mixed The option value.
- Depuis:
- 11.3
Définition à la ligne 57 du fichier http.php.
JHttp::head |
( |
|
$url, |
|
|
array |
$headers = null , |
|
|
|
$timeout = null |
|
) |
| |
Method to send the HEAD command to the server.
- Paramètres:
-
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. |
- Renvoie:
- JHttpResponse
- Depuis:
- 11.3
Définition à la ligne 123 du fichier http.php.
{
$temp = (array) $this->
options->get(
'headers');
foreach ($temp as $key => $val)
{
if (!isset($headers[$key]))
{
$headers[$key] = $val;
}
}
if ($timeout === null && $this->
options->exists(
'timeout'))
{
$timeout = $this->
options->get(
'timeout');
}
return $this->transport->request(
'HEAD',
new JUri($url), null, $headers, $timeout, $this->
options->get(
'userAgent', null));
}
JHttp::options |
( |
|
$url, |
|
|
array |
$headers = null , |
|
|
|
$timeout = null |
|
) |
| |
Method to send the OPTIONS command to the server.
- Paramètres:
-
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. |
- Renvoie:
- JHttpResponse
- Depuis:
- 11.3
Définition à la ligne 90 du fichier http.php.
{
$temp = (array) $this->
options->get(
'headers');
foreach ($temp as $key => $val)
{
if (!isset($headers[$key]))
{
$headers[$key] = $val;
}
}
if ($timeout === null && $this->
options->exists(
'timeout'))
{
$timeout = $this->
options->get(
'timeout');
}
return $this->transport->request(
'OPTIONS',
new JUri($url), null, $headers, $timeout, $this->
options->get(
'userAgent', null));
}
JHttp::patch |
( |
|
$url, |
|
|
|
$data, |
|
|
array |
$headers = null , |
|
|
|
$timeout = null |
|
) |
| |
Method to send the PATCH command to the server.
- Paramètres:
-
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. |
- Renvoie:
- JHttpResponse
- Depuis:
- 12.2
Définition à la ligne 324 du fichier http.php.
{
$temp = (array) $this->
options->get(
'headers');
foreach ($temp as $key => $val)
{
if (!isset($headers[$key]))
{
$headers[$key] = $val;
}
}
if ($timeout === null && $this->
options->exists(
'timeout'))
{
$timeout = $this->
options->get(
'timeout');
}
return $this->transport->request(
'PATCH',
new JUri($url), $data, $headers, $timeout, $this->
options->get(
'userAgent', null));
}
JHttp::post |
( |
|
$url, |
|
|
|
$data, |
|
|
array |
$headers = null , |
|
|
|
$timeout = null |
|
) |
| |
Method to send the POST command to the server.
- Paramètres:
-
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. |
- Renvoie:
- JHttpResponse
- Depuis:
- 11.3
Définition à la ligne 190 du fichier http.php.
{
$temp = (array) $this->
options->get(
'headers');
foreach ($temp as $key => $val)
{
if (!isset($headers[$key]))
{
$headers[$key] = $val;
}
}
if ($timeout === null && $this->
options->exists(
'timeout'))
{
$timeout = $this->
options->get(
'timeout');
}
return $this->transport->request(
'POST',
new JUri($url), $data, $headers, $timeout, $this->
options->get(
'userAgent', null));
}
JHttp::put |
( |
|
$url, |
|
|
|
$data, |
|
|
array |
$headers = null , |
|
|
|
$timeout = null |
|
) |
| |
Method to send the PUT command to the server.
- Paramètres:
-
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. |
- Renvoie:
- JHttpResponse
- Depuis:
- 11.3
Définition à la ligne 224 du fichier http.php.
{
$temp = (array) $this->
options->get(
'headers');
foreach ($temp as $key => $val)
{
if (!isset($headers[$key]))
{
$headers[$key] = $val;
}
}
if ($timeout === null && $this->
options->exists(
'timeout'))
{
$timeout = $this->
options->get(
'timeout');
}
return $this->transport->request(
'PUT',
new JUri($url), $data, $headers, $timeout, $this->
options->get(
'userAgent', null));
}
JHttp::setOption |
( |
|
$key, |
|
|
|
$value |
|
) |
| |
Set an option for the HTTP client.
- Paramètres:
-
string | $key | The name of the option to set. |
mixed | $value | The option value to set. |
- Renvoie:
- JHttp This object for method chaining.
- Depuis:
- 11.3
Définition à la ligne 72 du fichier http.php.
JHttp::trace |
( |
|
$url, |
|
|
array |
$headers = null , |
|
|
|
$timeout = null |
|
) |
| |
Method to send the TRACE command to the server.
- Paramètres:
-
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. |
- Renvoie:
- JHttpResponse
- Depuis:
- 11.3
Définition à la ligne 290 du fichier http.php.
{
$temp = (array) $this->
options->get(
'headers');
foreach ($temp as $key => $val)
{
if (!isset($headers[$key]))
{
$headers[$key] = $val;
}
}
if ($timeout === null && $this->
options->exists(
'timeout'))
{
$timeout = $this->
options->get(
'timeout');
}
return $this->transport->request(
'TRACE',
new JUri($url), null, $headers, $timeout, $this->
options->get(
'userAgent', null));
}
Documentation des données membres
La documentation de cette classe a été générée à partir du fichier suivant :