ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
|
Provides support for performing web-requests via curl. More...
Public Member Functions | |
setCurlOptions (array $options) | |
Set additional curl options. More... | |
initAndConfigure () | |
Internal method to initialize our cURL handle and configure the request. More... | |
Public Member Functions inherited from CAS_Request_AbstractRequest | |
setUrl ($url) | |
Set the URL of the Request. More... | |
addCookie ($name, $value) | |
Add a cookie to the request. More... | |
addCookies (array $cookies) | |
Add an array of cookies to the request. More... | |
addHeader ($header) | |
Add a header string to the request. More... | |
addHeaders (array $headers) | |
Add an array of header strings to the request. More... | |
makePost () | |
Make the request a POST request rather than the default GET request. More... | |
setPostBody ($body) | |
Add a POST body to the request. More... | |
setSslCaCert ($caCertPath, $validate_cn=true) | |
Specify the path to an SSL CA certificate to validate the server with. More... | |
send () | |
Perform the request. More... | |
getResponseHeaders () | |
Answer the headers of the response. More... | |
getResponseStatusCode () | |
Answer HTTP status code of the response. More... | |
getResponseBody () | |
Answer the body of response. More... | |
getErrorMessage () | |
Answer a message describing any errors if the request failed. More... | |
Public Member Functions inherited from CAS_Request_RequestInterface | |
setUrl ($url) | |
Set the URL of the Request. More... | |
addCookie ($name, $value) | |
Add a cookie to the request. More... | |
addCookies (array $cookies) | |
Add an array of cookies to the request. More... | |
addHeader ($header) | |
Add a header string to the request. More... | |
addHeaders (array $headers) | |
Add an array of header strings to the request. More... | |
makePost () | |
Make the request a POST request rather than the default GET request. More... | |
setPostBody ($body) | |
Add a POST body to the request. More... | |
setSslCaCert ($caCertPath, $validate_cn=true) | |
Specify the path to an SSL CA certificate to validate the server with. More... | |
send () | |
Perform the request. More... | |
getResponseHeaders () | |
Answer the headers of the response. More... | |
getResponseStatusCode () | |
Answer HTTP status code of the response. More... | |
getResponseBody () | |
Answer the body of response. More... | |
getErrorMessage () | |
Answer a message describing any errors if the request failed. More... | |
Protected Member Functions | |
sendRequest () | |
Send the request and store the results. More... | |
Protected Member Functions inherited from CAS_Request_AbstractRequest | |
sendRequest () | |
Send the request and store the results. More... | |
storeResponseHeaders (array $headers) | |
Store the response headers. More... | |
storeResponseHeader ($header) | |
Store a single response header to our array. More... | |
storeResponseBody ($body) | |
Store the response body. More... | |
storeErrorMessage ($message) | |
Add a string to our error message. More... | |
Private Member Functions | |
_storeResponseBody ($body) | |
Store the response body. More... | |
_curlReadHeaders ($ch, $header) | |
Internal method for capturing the headers from a curl request. More... | |
Private Attributes | |
$_curlOptions = array() | |
Additional Inherited Members | |
Protected Attributes inherited from CAS_Request_AbstractRequest | |
$url = null | |
$cookies = array() | |
$headers = array() | |
$isPost = false | |
$postBody = null | |
$caCertPath = null | |
$validateCN = true | |
Provides support for performing web-requests via curl.
Definition at line 40 of file CurlRequest.php.
|
private |
Internal method for capturing the headers from a curl request.
handle | $ch | handle of curl |
string | $header | header |
Definition at line 192 of file CurlRequest.php.
References $header, and CAS_Request_AbstractRequest\storeResponseHeader().
|
private |
Store the response body.
This method should NOT be used outside of the CurlRequest or the CurlMultiRequest.
string | $body | body to stor |
Definition at line 179 of file CurlRequest.php.
References CAS_Request_AbstractRequest\storeResponseBody().
CAS_Request_CurlRequest::initAndConfigure | ( | ) |
Internal method to initialize our cURL handle and configure the request.
This method should NOT be used outside of the CurlRequest or the CurlMultiRequest.
Definition at line 99 of file CurlRequest.php.
References $key, $name, and phpCAS\trace().
Referenced by sendRequest().
|
protected |
Send the request and store the results.
Definition at line 61 of file CurlRequest.php.
References $res, initAndConfigure(), CAS_Request_AbstractRequest\storeErrorMessage(), CAS_Request_AbstractRequest\storeResponseBody(), phpCAS\trace(), phpCAS\traceBegin(), and phpCAS\traceEnd().
CAS_Request_CurlRequest::setCurlOptions | ( | array | $options | ) |
Set additional curl options.
array | $options | option to set |
Definition at line 50 of file CurlRequest.php.
References PHPMailer\PHPMailer\$options.
|
private |
Definition at line 54 of file CurlRequest.php.