-
Notifications
You must be signed in to change notification settings - Fork 1
class Response
src/Curl/ObjCurl/Response.php
Application
No public properties found
No constants found
__toString() | complain() | contentType() | cookie() | cookies() | decode() | decodeJSON() | decodeXML() | header() | headers() | id() | info() | infos() | is() | mimeParams() | mimeSubType() | mimeSuffix() | mimeTree() | mimeType() | payload() | raise() | status() | times() | url() |
Returns HTTP response message
- Inherited from \Curl\ObjCurl\Response
public
__toString() : string
Log result depending on status code
- Inherited from \Curl\ObjCurl\Response
public
complain(\Psr\Log\LoggerInterface $logger, int $min_level = 3, array $context = []) : void
Condensed MIME content type
- Inherited from \Curl\ObjCurl\Response
public
contentType(?string $type = null, ?string $subtype = null) : string
Get a cookie
Returns null when cookie not found Returns string when cookie is found and $verbose is false Returns array when cookie is found and $verbose is true
- Inherited from \Curl\ObjCurl\Response
public
cookie(string $name, bool $verbose = false) : null|string|array
Get all cookies
- Inherited from \Curl\ObjCurl\Response
public
cookies() : array
Decode payload (generic method with auto-detection)
Currently only JSON is supported.
- Inherited from \Curl\ObjCurl\Response
public
decode(?string $default_type = null) : mixed
Decode JSON payload
- Inherited from \Curl\ObjCurl\Response
public
decodeJSON(bool $assoc = false) : mixed
Decode XML payload
- Inherited from \Curl\ObjCurl\Response
public
decodeXML(int $options) : \DOMDocument
HTTP response header
- Inherited from \Curl\ObjCurl\Response
public
header(string $key) : string|array
HTTP response headers
- Inherited from \Curl\ObjCurl\Response
public
headers(string $key) : array
Unique ID of request
- Inherited from \Curl\ObjCurl\Response
public
id() : string
cURL getinfo
- Inherited from \Curl\ObjCurl\Response
public
info(string $key, mixed $default = null) : mixed
cURL getinfo
- Inherited from \Curl\ObjCurl\Response
public
infos() : array
Checks whether a HTTP status code matches
$response->is(200); // matches only code 200 $response->is(30); // matches 30x (300..309) $response->is(4); // matches 4xx (400..499)
* Inherited from [\Curl\ObjCurl\Response](class-Response)
`public` `is(int $code) : bool`
#### mimeParams()
MIME parameters
>
* Inherited from [\Curl\ObjCurl\Response](class-Response)
`public` `mimeParams(?string $default = null) : string`
#### mimeSubType()
MIME subtype
>
* Inherited from [\Curl\ObjCurl\Response](class-Response)
`public` `mimeSubType(?string $default = null) : string`
#### mimeSuffix()
MIME suffix
>
* Inherited from [\Curl\ObjCurl\Response](class-Response)
`public` `mimeSuffix(?string $default = null) : string`
#### mimeTree()
MIME subtree tree
>
* Inherited from [\Curl\ObjCurl\Response](class-Response)
`public` `mimeTree(?string $default = null) : string`
#### mimeType()
Top-level MIME type
>
* Inherited from [\Curl\ObjCurl\Response](class-Response)
`public` `mimeType(?string $default = null) : string`
#### payload()
Raw response body
>
* Inherited from [\Curl\ObjCurl\Response](class-Response)
`public` `payload() : string`
#### raise()
Throws this response as an runtime exception
>
* Inherited from [\Curl\ObjCurl\Response](class-Response)
`public` `raise(string $reason, int $code) : mixed`
#### status()
HTTP status code
> ```php
$response->status(1) === 2; // status code is 2xx
- Inherited from \Curl\ObjCurl\Response
public
status(int $digits = 3) : int
Return performance data
- Inherited from \Curl\ObjCurl\Response
public
times() : float[]
Return request URI
- Inherited from \Curl\ObjCurl\Response
public
url(?string $part = null) : mixed
\ » Classes » Response
Documentation generated on August 1st, 2021 at 10:24.
Powered by phpDocumentor with template GitHub-wiki.