72 'Request has already been sent cannot '.__METHOD__
92 'Request has already been sent cannot '.__METHOD__
96 $this->cookies[$name] = $value;
113 'Request has already been sent cannot '.__METHOD__
117 $this->cookies = array_merge($this->cookies, $cookies);
132 'Request has already been sent cannot '.__METHOD__
151 'Request has already been sent cannot '.__METHOD__
155 $this->headers = array_merge($this->headers, $headers);
168 'Request has already been sent cannot '.__METHOD__
172 $this->isPost =
true;
187 'Request has already been sent cannot '.__METHOD__
190 if (!$this->isPost) {
192 'Cannot add a POST body to a GET request, use makePost() first.' 196 $this->postBody = $body;
212 'Request has already been sent cannot '.__METHOD__
216 $this->validateCN = $validate_cn;
233 'Request has already been sent cannot send again.' 236 if (is_null($this->url) || !$this->url) {
238 'A url must be specified via setUrl() before the request can be sent.' 261 $this->_responseHeaders = array_merge($this->_responseHeaders, $headers);
273 $this->_responseHeaders[] =
$header;
285 $this->_responseBody = $body;
297 $this->_errorMessage .= $message;
314 'Request has not been sent yet. Cannot '.__METHOD__
330 'Request has not been sent yet. Cannot '.__METHOD__
335 '/HTTP\/[0-9.]+\s+([0-9]+)\s*(.*)/',
336 $this->_responseHeaders[0], $matches
340 'Bad response, no status code was found in the first line.' 344 return intval($matches[1]);
357 'Request has not been sent yet. Cannot '.__METHOD__
374 'Request has not been sent yet. Cannot '.__METHOD__
makePost()
Make the request a POST request rather than the default GET request.
addCookies(array $cookies)
Add an array of cookies to the request.
setSslCaCert($caCertPath, $validate_cn=true)
Specify the path to an SSL CA certificate to validate the server with.
addCookie($name, $value)
Add a cookie to the request.
getErrorMessage()
Answer a message describing any errors if the request failed.
setPostBody($body)
Add a POST body to the request.
This interface defines a class library for performing web requests.
setUrl($url)
Set the URL of the Request.
Provides support for performing web-requests via curl.
addHeader($header)
Add a header string to the request.
This class defines Exceptions that should be thrown when the sequence of operations is invalid...
getResponseStatusCode()
Answer HTTP status code of the response.
An Exception for problems performing requests.
storeErrorMessage($message)
Add a string to our error message.
getResponseBody()
Answer the body of response.
sendRequest()
Send the request and store the results.
Create styles array
The data for the language used.
addHeaders(array $headers)
Add an array of header strings to the request.
storeResponseHeaders(array $headers)
Store the response headers.
storeResponseHeader($header)
Store a single response header to our array.
storeResponseBody($body)
Store the response body.
send()
Perform the request.
getResponseHeaders()
Answer the headers of the response.