|
| | __construct ($host, $port, $scheme='') |
| |
| | addToHeader ($key, $value) |
| |
| | send ($target= '/', $method= 'GET', $timeout=3, $post_vars=NULL) |
| |
| | sendWithSock ($target, $method, $timeout, $post_vars) |
| |
| | sendWithCurl ($target, $method, $timeout, $post_vars) |
| |
Definition at line 13 of file XEHttpRequest.class.php.
| XEHttpRequest::__construct |
( |
|
$host, |
|
|
|
$port, |
|
|
|
$scheme = '' |
|
) |
| |
| XEHttpRequest::addToHeader |
( |
|
$key, |
|
|
|
$value |
|
) |
| |
Mether to add key/value pair to the HTTP request header
- Parameters
-
| int | string | $key | HTTP header element |
| string | $value | value string for HTTP header element |
- Returns
- void
Definition at line 58 of file XEHttpRequest.class.php.
| XEHttpRequest::send |
( |
|
$target = '/', |
|
|
|
$method = 'GET', |
|
|
|
$timeout = 3, |
|
|
|
$post_vars = NULL |
|
) |
| |
Send HTTP message to the host
- Parameters
-
| string | $target | ip or url of the external server |
| string | $method | HTTP method such as GET and POST |
| int | $timeout | time out value for HTTP request expiration |
| array | $post_vars | variables to send |
- Returns
- object Returns an object containing HTTP Response body and HTTP response code
Definition at line 71 of file XEHttpRequest.class.php.
| XEHttpRequest::sendWithCurl |
( |
|
$target, |
|
|
|
$method, |
|
|
|
$timeout, |
|
|
|
$post_vars |
|
) |
| |
Send a request with the curl library
- Parameters
-
| string | $target | ip or url of the external server |
| string | $method | HTTP method such as GET and POST |
| int | $timeout | time out value for HTTP request expiration |
| array | $post_vars | variables to send |
- Returns
- object Returns an object containing HTTP Response body and HTTP response code
Definition at line 205 of file XEHttpRequest.class.php.
| XEHttpRequest::sendWithSock |
( |
|
$target, |
|
|
|
$method, |
|
|
|
$timeout, |
|
|
|
$post_vars |
|
) |
| |
Send a request with the file socket
- Parameters
-
| string | $target | ip or url of the external server |
| string | $method | HTTP method such as GET and POST |
| int | $timeout | time out value for HTTP request expiration |
| array | $post_vars | variables to send |
- Returns
- object Returns an object containing HTTP Response body and HTTP response code
Definition at line 115 of file XEHttpRequest.class.php.
| XEHttpRequest::$m_headers |
The documentation for this class was generated from the following file: