This class abstracts the work of doing external requests.
Options:
'URL' => NULL,
'Host' => NULL, // Override the Host: header
'Method' => 'GET', // HTTP Method
'ConnectTimeout' => 5, // Connection timeout
'Timeout' => 5, // Request timeout
'TransferMode' => 'normal', // or 'binary'
'SaveAs' => NULL, // Download the response to this file
'Redirects' => TRUE, // Allow 302 and 302 redirects
'SSLNoVerify' => FALSE, // Verify the remote SSL cert
'PreEncodePost' => TRUE, //
'Cookies' => TRUE, // Send user's browser cookies?
'CookieJar' => FALSE, // Create a cURL CookieJar?
'CookieSession' => FALSE, // Should old cookies be trashed starting now?
'CloseSession' => TRUE, // Whether to close the session. Should always do this.
'Redirected' => FALSE, // Is this a redirected request?
'Debug' => FALSE, // Debug output
'Simulate' => FALSE // Don't actually request, just set up
public request ( $Options = null, array $QueryParams = null, array $Files = null, array $ExtraHeaders = null ) : type |
$QueryParams |
array |
GET/POST parameters |
$Files |
array |
List of files to upload |
$ExtraHeaders |
array |
Any additional headers to tack on |
return |
type |
|
$ContentLength public_oe property
$ContentType public_oe property
$ParsedBody public_oe property
$RequestBody public_oe property
$ResponseBody public_oe property