HttpRequest
class HttpRequest (View source)
Constants
METH_GET |
|
METH_HEAD |
|
METH_POST |
|
METH_PUT |
|
METH_DELETE |
|
METH_OPTIONS |
|
METH_TRACE |
|
METH_CONNECT |
|
METH_PROPFIND |
|
METH_PROPPATCH |
|
METH_MKCOL |
|
METH_COPY |
|
METH_MOVE |
|
METH_LOCK |
|
METH_UNLOCK |
|
METH_VERSION_CONTROL |
|
METH_REPORT |
|
METH_CHECKOUT |
|
METH_CHECKIN |
|
METH_UNCHECKOUT |
|
METH_MKWORKSPACE |
|
METH_UPDATE |
|
METH_LABEL |
|
METH_MERGE |
|
METH_BASELINE_CONTROL |
|
METH_MKACTIVITY |
|
METH_ACL |
|
VERSION_1_0 |
|
VERSION_1_1 |
|
VERSION_NONE |
|
VERSION_ANY |
|
SSL_VERSION_TLSv1 |
|
SSL_VERSION_SSLv2 |
|
SSL_VERSION_SSLv3 |
|
SSL_VERSION_ANY |
|
IPRESOLVE_V4 |
|
IPRESOLVE_V6 |
|
IPRESOLVE_ANY |
|
AUTH_BASIC |
|
AUTH_DIGEST |
|
AUTH_NTLM |
|
AUTH_GSSNEG |
|
AUTH_ANY |
|
PROXY_SOCKS4 |
|
PROXY_SOCKS5 |
|
PROXY_HTTP |
|
Properties
$recordHistory |
Methods
(PECL pecl_http >= 0.10.0)
HttpRequest constructor
(PECL pecl_http >= 0.10.0)
Set options
(PECL pecl_http >= 0.10.0)
Get options
(PECL pecl_http >= 0.10.0)
Set ssl options
(PECL pecl_http >= 0.10.0)
Get ssl options
(PECL pecl_http >= 0.12.0)
Add ssl options
(PECL pecl_http >= 0.10.0)
Add headers
(PECL pecl_http >= 0.10.0)
Get headers
(PECL pecl_http >= 0.12.0)
Set headers
(PECL pecl_http >= 0.10.0)
Add cookies
(PECL pecl_http >= 0.10.0)
Get cookies
(PECL pecl_http >= 0.12.0)
Set cookies
(PECL pecl_http >= 1.0.0)
Enable cookies
(PECL pecl_http >= 1.0.0)
Reset cookies
No description
(PECL pecl_http >= 0.10.0)
Set method
(PECL pecl_http >= 0.10.0)
Get method
(PECL pecl_http >= 0.10.0)
Set URL
(PECL pecl_http >= 0.10.0)
Get url
(PECL pecl_http >= 0.10.0)
Set content type
(PECL pecl_http >= 0.10.0)
Get content type
(PECL pecl_http >= 0.10.0)
Set query data
(PECL pecl_http >= 0.10.0)
Get query data
(PECL pecl_http >= 0.10.0)
Add query data
(PECL pecl_http >= 0.10.0)
Set post fields
(PECL pecl_http >= 0.10.0)
Get post fields
(PECL pecl_http >= 0.10.0)
Add post fields
No description
No description
No description
(PECL pecl_http 0.14.0-1.4.1)
Set raw post data
(PECL pecl_http 0.14.0-1.4.1)
Get raw post data
(PECL pecl_http 0.14.0-1.4.1)
Add raw post data
(PECL pecl_http >= 0.10.0)
Set post files
(PECL pecl_http >= 0.10.0)
Add post file
(PECL pecl_http >= 0.10.0)
Get post files
(PECL pecl_http >= 0.10.0)
Set put file
(PECL pecl_http >= 0.10.0)
Get put file
(PECL pecl_http >= 0.25.0)
Set put data
(PECL pecl_http >= 0.25.0)
Get put data
(PECL pecl_http >= 0.25.0)
Add put data
(PECL pecl_http >= 0.10.0)
Send request
(PECL pecl_http >= 0.10.0)
Get response data
(PECL pecl_http >= 0.10.0)
Get response header(s)
(PECL pecl_http >= 0.23.0)
Get response cookie(s)
(PECL pecl_http >= 0.10.0)
Get response code
(PECL pecl_http >= 0.23.0)
Get response status
(PECL pecl_http >= 0.10.0)
Get response body
(PECL pecl_http >= 0.10.0)
Get response info
(PECL pecl_http >= 0.10.0)
Get response message
(PECL pecl_http >= 0.21.0)
Get raw response message
(PECL pecl_http >= 0.11.0)
Get request message
(PECL pecl_http >= 0.21.0)
Get raw request message
(PECL pecl_http >= 0.15.0)
Get history
(PECL pecl_http >= 0.15.0)
Clear history
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
Details
__construct(string $url = null, int $request_method = null, array|null $options = null)
(PECL pecl_http >= 0.10.0)
HttpRequest constructor
bool
setOptions(array|null $options = null)
(PECL pecl_http >= 0.10.0)
Set options
array
getOptions()
(PECL pecl_http >= 0.10.0)
Get options
bool
setSslOptions(array|null $options = null)
(PECL pecl_http >= 0.10.0)
Set ssl options
array
getSslOptions()
(PECL pecl_http >= 0.10.0)
Get ssl options
bool
addSslOptions(array $option)
(PECL pecl_http >= 0.12.0)
Add ssl options
bool
addHeaders(array $headers)
(PECL pecl_http >= 0.10.0)
Add headers
array
getHeaders()
(PECL pecl_http >= 0.10.0)
Get headers
bool
setHeaders(array|null $headers = null)
(PECL pecl_http >= 0.12.0)
Set headers
bool
addCookies(array $cookies)
(PECL pecl_http >= 0.10.0)
Add cookies
array
getCookies()
(PECL pecl_http >= 0.10.0)
Get cookies
bool
setCookies(array|null $cookies = null)
(PECL pecl_http >= 0.12.0)
Set cookies
bool
enableCookies()
(PECL pecl_http >= 1.0.0)
Enable cookies
bool
resetCookies(bool $session_only = null)
(PECL pecl_http >= 1.0.0)
Reset cookies
flushCookies()
No description
bool
setMethod(int $request_method)
(PECL pecl_http >= 0.10.0)
Set method
int
getMethod()
(PECL pecl_http >= 0.10.0)
Get method
bool
setUrl(string $url)
(PECL pecl_http >= 0.10.0)
Set URL
string
getUrl()
(PECL pecl_http >= 0.10.0)
Get url
bool
setContentType(string $content_type)
(PECL pecl_http >= 0.10.0)
Set content type
string
getContentType()
(PECL pecl_http >= 0.10.0)
Get content type
bool
setQueryData(mixed $query_data)
(PECL pecl_http >= 0.10.0)
Set query data
string
getQueryData()
(PECL pecl_http >= 0.10.0)
Get query data
bool
addQueryData(array $query_params)
(PECL pecl_http >= 0.10.0)
Add query data
bool
setPostFields(array $post_data)
(PECL pecl_http >= 0.10.0)
Set post fields
array
getPostFields()
(PECL pecl_http >= 0.10.0)
Get post fields
bool
addPostFields(array $post_data)
(PECL pecl_http >= 0.10.0)
Add post fields
setBody($request_body_data)
No description
getBody()
No description
addBody($request_body_data)
No description
bool
setRawPostData(string $raw_post_data = null)
(PECL pecl_http 0.14.0-1.4.1)
Set raw post data
string
getRawPostData()
(PECL pecl_http 0.14.0-1.4.1)
Get raw post data
bool
addRawPostData(string $raw_post_data)
(PECL pecl_http 0.14.0-1.4.1)
Add raw post data
bool
setPostFiles(array $post_files)
(PECL pecl_http >= 0.10.0)
Set post files
bool
addPostFile(string $name, string $file, string $content_type = null)
(PECL pecl_http >= 0.10.0)
Add post file
array
getPostFiles()
(PECL pecl_http >= 0.10.0)
Get post files
bool
setPutFile(string $file = null)
(PECL pecl_http >= 0.10.0)
Set put file
string
getPutFile()
(PECL pecl_http >= 0.10.0)
Get put file
bool
setPutData(string $put_data = null)
(PECL pecl_http >= 0.25.0)
Set put data
string
getPutData()
(PECL pecl_http >= 0.25.0)
Get put data
bool
addPutData(string $put_data)
(PECL pecl_http >= 0.25.0)
Add put data
HttpMessage
send()
(PECL pecl_http >= 0.10.0)
Send request
array
getResponseData()
(PECL pecl_http >= 0.10.0)
Get response data
mixed
getResponseHeader(string $name = null)
(PECL pecl_http >= 0.10.0)
Get response header(s)
stdClass[]
getResponseCookies(int $flags = null, array|null $allowed_extras = null)
(PECL pecl_http >= 0.23.0)
Get response cookie(s)
int
getResponseCode()
(PECL pecl_http >= 0.10.0)
Get response code
string
getResponseStatus()
(PECL pecl_http >= 0.23.0)
Get response status
string
getResponseBody()
(PECL pecl_http >= 0.10.0)
Get response body
mixed
getResponseInfo(string $name = null)
(PECL pecl_http >= 0.10.0)
Get response info
HttpMessage
getResponseMessage()
(PECL pecl_http >= 0.10.0)
Get response message
string
getRawResponseMessage()
(PECL pecl_http >= 0.21.0)
Get raw response message
HttpMessage
getRequestMessage()
(PECL pecl_http >= 0.11.0)
Get request message
string
getRawRequestMessage()
(PECL pecl_http >= 0.21.0)
Get raw request message
HttpMessage
getHistory()
(PECL pecl_http >= 0.15.0)
Get history
void
clearHistory()
(PECL pecl_http >= 0.15.0)
Clear history
static
factory($url, $method, $options, $class_name)
No description
static
get($url, $options, $info)
No description
static
head($url, $options, $info)
No description
static
postData($url, $data, $options, $info)
No description
static
postFields($url, $data, $options, $info)
No description
static
putData($url, $data, $options, $info)
No description
static
putFile($url, $file, $options, $info)
No description
static
putStream($url, $stream, $options, $info)
No description
static
methodRegister($method_name)
No description
static
methodUnregister($method)
No description
static
methodName($method_id)
No description
static
methodExists($method)
No description
static
encodeBody($fields, $files)
No description