|
phpCAS
version 1.4.0
|
Public Member Functions | |
| setUrl ($url) | |
| addCookie ($name, $value) | |
| addCookies (array $cookies) | |
| addHeader ($header) | |
| addHeaders (array $headers) | |
| makePost () | |
| setPostBody ($body) | |
| setSslCaCert ($caCertPath, $validate_cn=true) | |
| send () | |
| getResponseHeaders () | |
| getResponseStatusCode () | |
| getResponseBody () | |
| getErrorMessage () | |
This interface defines a class library for performing web requests.
Definition at line 40 of file RequestInterface.php.
| CAS_Request_RequestInterface::addCookie | ( | $name, | |
| $value | |||
| ) |
Add a cookie to the request.
| string | $name | name of cookie |
| string | $value | value of cookie |
| CAS_OutOfSequenceException | If called after the Request has been sent. |
| CAS_Request_RequestInterface::addCookies | ( | array | $cookies | ) |
Add an array of cookies to the request. The cookie array is of the form array('cookie_name' => 'cookie_value', 'cookie_name2' => cookie_value2')
| array | $cookies | cookies to add |
| CAS_OutOfSequenceException | If called after the Request has been sent. |
| CAS_Request_RequestInterface::addHeader | ( | $header | ) |
Add a header string to the request.
| string | $header | header to add |
| CAS_OutOfSequenceException | If called after the Request has been sent. |
Referenced by CAS_ProxiedService_Http_Post\populateRequest().
| CAS_Request_RequestInterface::addHeaders | ( | array | $headers | ) |
Add an array of header strings to the request.
| array | $headers | headers to add |
| CAS_OutOfSequenceException | If called after the Request has been sent. |
| CAS_Request_RequestInterface::getErrorMessage | ( | ) |
Answer a message describing any errors if the request failed.
| CAS_OutOfSequenceException | If called before the Request has been sent. |
| CAS_Request_RequestInterface::getResponseBody | ( | ) |
Answer the body of response.
| CAS_OutOfSequenceException | If called before the Request has been sent. |
| CAS_Request_RequestInterface::getResponseHeaders | ( | ) |
Answer the headers of the response.
| CAS_OutOfSequenceException | If called before the Request has been sent. |
| CAS_Request_RequestInterface::getResponseStatusCode | ( | ) |
Answer HTTP status code of the response
| CAS_OutOfSequenceException | If called before the Request has been sent. |
| CAS_Request_RequestInterface::makePost | ( | ) |
Make the request a POST request rather than the default GET request.
| CAS_OutOfSequenceException | If called after the Request has been sent. |
Referenced by CAS_ProxiedService_Http_Post\populateRequest().
| CAS_Request_RequestInterface::send | ( | ) |
Perform the request.
| CAS_OutOfSequenceException | If called multiple times. |
| CAS_Request_RequestInterface::setPostBody | ( | $body | ) |
Add a POST body to the request
| string | $body | body to add |
| CAS_OutOfSequenceException | If called after the Request has been sent. |
Referenced by CAS_ProxiedService_Http_Post\populateRequest().
| CAS_Request_RequestInterface::setSslCaCert | ( | $caCertPath, | |
$validate_cn = true |
|||
| ) |
Specify the path to an SSL CA certificate to validate the server with.
| string | $caCertPath | path to cert file |
| boolean | $validate_cn | validate CN of SSL certificate |
| CAS_OutOfSequenceException | If called after the Request has been sent. |
| CAS_Request_RequestInterface::setUrl | ( | $url | ) |
Set the URL of the Request
| string | $url | url to set |
| CAS_OutOfSequenceException | If called after the Request has been sent. |
1.8.13