|
const | FORM_URLENCODED = 'application/x-www-form-urlencoded' |
|
const | NO_QUIRK_VERSION = 0x071E00 |
|
const | UNKNOWN_CODE = 0 |
|
|
| checkMustRevalidateCachedRequest ($cached, $request) |
| Check if an already cached request must be revalidated, and if so update the request with the correct ETag headers.
|
|
| needsQuirk () |
| Test for the presence of a cURL header processing bug.
|
|
| updateCachedRequest ($cached, $responseHeaders) |
| Update a cached request, using the headers from the last response.
|
|
◆ __construct()
◆ checkMustRevalidateCachedRequest()
Google_IO_Abstract::checkMustRevalidateCachedRequest |
( |
| $cached, |
|
|
| $request ) |
|
protectedinherited |
Check if an already cached request must be revalidated, and if so update the request with the correct ETag headers.
- Parameters
-
Google_Http_Request | $cached | A previously cached response. |
Google_Http_Request | $request | The outbound request. return bool If the cached object needs to be revalidated, false if it is still current and can be re-used. |
◆ executeRequest()
Execute an HTTP Request.
- Parameters
-
- Return values
-
array | containing response headers, body, and http code |
- Exceptions
-
Reimplemented from Google_IO_Abstract.
Reimplemented in moodle_google_curlio.
◆ getCachedRequest()
@visible for testing.
- Parameters
-
- Return values
-
Google_Http_Request|bool | Returns the cached object or false if the operation was unsuccessful. |
◆ getHttpResponseHeaders()
Google_IO_Abstract::getHttpResponseHeaders |
( |
| $rawHeaders | ) |
|
|
inherited |
Parse out headers from raw headers.
- Parameters
-
rawHeaders | array or string |
- Return values
-
◆ getTimeout()
Google_IO_Curl::getTimeout |
( |
| ) |
|
◆ makeRequest()
Execute an HTTP Request.
- Parameters
-
- Return values
-
Google_Http_Request | http request with the response http code, response headers and response body filled in |
- Exceptions
-
◆ needsQuirk()
Google_IO_Curl::needsQuirk |
( |
| ) |
|
|
protected |
Test for the presence of a cURL header processing bug.
Test for the presence of a cURL header processing bug.The cURL bug was present in versions prior to 7.30.0 and caused the header length to be miscalculated when a "Connection established" header added by some proxies was present.
- Return values
-
- Return values
-
Reimplemented from Google_IO_Abstract.
◆ parseHttpResponse()
Google_IO_Abstract::parseHttpResponse |
( |
| $respData, |
|
|
| $headerSize ) |
|
inherited |
Used by the IO lib and also the batch processing.
- Parameters
-
- Return values
-
◆ processEntityRequest()
@visible for testing Process an http request that contains an enclosed entity.
- Parameters
-
- Return values
-
◆ setCachedRequest()
@visible for testing.
Cache the response to an HTTP request if it is cacheable.
- Parameters
-
- Return values
-
bool | Returns true if the insertion was successful. Otherwise, return false. |
◆ setOptions()
Google_IO_Curl::setOptions |
( |
| $options | ) |
|
◆ setTimeout()
Google_IO_Curl::setTimeout |
( |
| $timeout | ) |
|
◆ updateCachedRequest()
Google_IO_Abstract::updateCachedRequest |
( |
| $cached, |
|
|
| $responseHeaders ) |
|
protectedinherited |
Update a cached request, using the headers from the last response.
- Parameters
-
Google_Http_Request | $cached | A previously cached response. |
| mixed | Associative array of response headers from the last request. |
The documentation for this class was generated from the following file:
- lib/google/src/Google/IO/Curl.php