\QiniuResponse

Summary

Methods
Properties
Constants
__construct()
parse()
header()
error()
cachable()
bare()
ok()
success()
redirect()
forbidden()
notFound()
clientError()
serverError()
$code
$protocol
$message
$body
$error
$headers
$data
No constants found
decodeChunk()
No protected properties found
N/A
No private methods found
No private properties found
N/A

Properties

$code

$code : 

Type

$protocol

$protocol : 

Type

$message

$message : 

Type

$body

$body : 

Type

$error

$error : 

Type

$headers

$headers : 

Type

$data

$data : 

Type

Methods

__construct()

__construct(string  $response, boolean|string  $error = false) 

Parameters

string $response
boolean|string $error

parse()

parse(  $response) : array

Parse response

Parameters

$response

Returns

array

header()

header(string  $key, string  $default = null) : string

Get header

Parameters

string $key
string $default

Returns

string

error()

error() : boolean

Is error?

Returns

boolean

cachable()

cachable() : boolean

Is response cachable?

Returns

boolean

bare()

bare() : boolean

Is empty?

Returns

boolean

ok()

ok() : boolean

Is 200 ok?

Returns

boolean

success()

success() : boolean

Is successful?

Returns

boolean

redirect()

redirect() : boolean

Is redirect?

Returns

boolean

forbidden()

forbidden() : boolean

Is forbidden?

Returns

boolean

notFound()

notFound() : boolean

Is found?

Returns

boolean

clientError()

clientError() : boolean

Is client error?

Returns

boolean

serverError()

serverError() : boolean

Is server error?

Returns

boolean

decodeChunk()

decodeChunk(  $str) : string

Decode chunk

Parameters

$str

Returns

string