Checks if the Content-Type is of a certain type. This is useful if the
Content-Type header contains charset information and you need to know if the
Content-Type matches a particular type.
string
$statusCode The response status code (e.g. 200, 404, etc)
$headers
Guzzle\Common\ToArrayInterface
|array
$headers The response headers
$body
string|resource|
Guzzle\Http\EntityBodyInterface
$body The body of the response
Throws
Guzzle\Http\Exception\BadResponseException
if an invalid response code is given
Overrides
$asString
boolean
$asString Set to TRUE to return a string of the body rather than a full body
object
Returns
Guzzle\Http\EntityBodyInterface
|string
Returns
array|string|null
Returns all stats if no key is set, a single stat if a key is set, or null if a
key is set and not found
http://www.php.net/manual/en/function.curl-getinfo.php
integer
$statusCode Response status code to set
$reasonPhrase
string
$reasonPhrase Response reason phrase
Returns
Guzzle\Http\Message\Response
Throws
Guzzle\Http\Exception\BadResponseException
when an invalid response code is received
Returns
string|null
Returns valid actions for a specified resource. To be used for a 405 Method not
allowed.
Returns
string
Returns where in a full body message this partial message belongs (e.g. bytes
21010-47021/47022).
Checks if the Content-Type is of a certain type. This is useful if the
Content-Type header contains charset information and you need to know if the
Content-Type matches a particular type.
Parameters
$type
string
$type Content type to check against
Returns
boolean
Returns
string|null
Returns an identifier for a specific version of a resource, often a Message
digest.
Returns
string|null
Returns the last modified date for the requested object, in RFC 2822 format
(e.g. Tue, 15 Nov 1994 12:45:26 GMT)
Returns
Guzzle\Http\Message\Header
|null
Returns the implementation-specific headers that may have various effects
anywhere along the request-response chain.
Returns
integer|null
If an entity is temporarily unavailable, this instructs the client to try again
after a specified period of time.
Returns
string|null
The Trailer general field value indicates that the given set of header fields is
present in the trailer of a message encoded with chunked transfer-coding.
Returns
string|null
Tells downstream proxies how to match future request headers to decide whether
the cached response can be used rather than requesting a fresh one from the
origin server.
Returns
string|null
Indicates the authentication scheme that should be used to access the requested
entity
Check if the response is considered fresh.
A response is considered fresh when its age is less than or equal to the
freshness lifetime (maximum age) of the response.
Get the freshness of the response by returning the difference of the maximum
lifetime of the response and the age of the response (max-age - age).
Freshness values less than 0 mean that the response is no longer fresh and is
ABS(freshness) seconds expired. Freshness values of greater than zero is the
number of seconds until the response is no longer fresh. A NULL result means
that no freshness information is available.
Parse the XML response body and return a \SimpleXMLElement.
In order to prevent XXE attacks, this method disables loading external
entities. If you rely on external entities, then you must parse the XML response
manually by accessing the response body directly.