ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
RequestInterface.php
Go to the documentation of this file.
1 <?php
2 
41 {
42 
43  /*********************************************************
44  * Configure the Request
45  *********************************************************/
46 
55  public function setUrl($url);
56 
66  public function addCookie($name, $value);
67 
78  public function addCookies(array $cookies);
79 
88  public function addHeader($header);
89 
98  public function addHeaders(array $headers);
99 
106  public function makePost();
107 
116  public function setPostBody($body);
117 
118 
128  public function setSslCaCert($caCertPath, $validate_cn = true);
129 
130 
131 
132  /*********************************************************
133  * 2. Send the Request
134  *********************************************************/
135 
142  public function send();
143 
144  /*********************************************************
145  * 3. Access the response
146  *********************************************************/
147 
154  public function getResponseHeaders();
155 
162  public function getResponseStatusCode();
163 
170  public function getResponseBody();
171 
178  public function getErrorMessage();
179 }
getResponseStatusCode()
Answer HTTP status code of the response.
This interface defines a class library for performing web requests.
setPostBody($body)
Add a POST body to the request.
makePost()
Make the request a POST request rather than the default GET request.
send()
Perform the request.
addHeaders(array $headers)
Add an array of header strings to the request.
setSslCaCert($caCertPath, $validate_cn=true)
Specify the path to an SSL CA certificate to validate the server with.
getResponseBody()
Answer the body of response.
addCookie($name, $value)
Add a cookie to the request.
setUrl($url)
Set the URL of the Request.
$url
getResponseHeaders()
Answer the headers of the response.
addCookies(array $cookies)
Add an array of cookies to the request.
getErrorMessage()
Answer a message describing any errors if the request failed.
addHeader($header)
Add a header string to the request.