Class HttpHelper
Helper methods for HTTP request/response handling
Methods summary
public static
resource
|
#
createConnection(
Create a one-time HTTP connection by opening a socket to the server |
public static
string
|
#
buildRequest(
Create a request string (header and body) |
public static
boolean
|
|
public static
string
|
|
public static
array
|
#
parseHttpMessage( string $httpMessage, string $originUrl = null, string $originMethod = null )
Splits a http message into its header and body. |
public static
array
|
#
parseHeaders( string $headers )
Process a string of HTTP headers into an array of header => values. |
Constants summary
string |
METHOD_POST
HTTP POST string constant |
#
'POST'
|
string |
METHOD_PUT
HTTP PUT string constant |
#
'PUT'
|
string |
METHOD_DELETE
HTTP DELETE string constant |
#
'DELETE'
|
string |
METHOD_GET
HTTP GET string constant |
#
'GET'
|
string |
METHOD_HEAD
HTTP HEAD string constant |
#
'HEAD'
|
string |
METHOD_PATCH
HTTP PATCH string constant |
#
'PATCH'
|
integer |
CHUNK_SIZE
Chunk size (number of bytes processed in one batch) |
#
8192
|
string |
EOL
End of line mark used in HTTP |
#
"\r\n"
|
string |
SEPARATOR
Separator between header and body |
#
"\r\n\r\n"
|
string |
PROTOCOL
HTTP protocol version used, hard-coded to version 1.1 |
#
'HTTP/1.1'
|
string |
MIME_BOUNDARY
Boundary string for batch request parts |
#
'XXXsubpartXXX'
|
string |
ASYNC_HEADER
HTTP Header for making an operation asynchronous |
#
'X-Arango-Async'
|