\OSS\ResultGetCorsResult

Class Result, The result class of The operation of the base class, different requests in dealing with the return of data have different logic, The specific parsing logic postponed to subclass implementation

Summary

Methods
Properties
Constants
__construct()
getRequestId()
getData()
isOK()
parseResponse()
getRawResponse()
No public properties found
No constants found
parseDataFromResponse()
isResponseOk()
$isOk
$parsedData
$rawResponse
N/A
retrieveErrorMessage()
retrieveErrorCode()
No private properties found
N/A

Properties

$isOk

$isOk

Indicate whether the request is successful

$parsedData

$parsedData

Data parsed by subclasses

$rawResponse

$rawResponse : \OSS\Http\ResponseCore

Store the original Response returned by the auth function

Type

ResponseCore

Methods

__construct()

__construct( $response) : mixed

Result constructor.

Parameters

$response

ResponseCore

Throws

\OSS\Core\OssException

Returns

mixed —

getRequestId()

getRequestId() : string

Get requestId

Returns

string —

getData()

getData() : mixed

Get the returned data, different request returns the data format is different

$return mixed

Returns

mixed —

isOK()

isOK() : mixed

Whether the operation is successful

Returns

mixed —

parseResponse()

parseResponse() : mixed

Throws

\OSS\Core\OssException

Returns

mixed —

getRawResponse()

getRawResponse() : \OSS\Http\ResponseCore

Return the original return data

Returns

\OSS\Http\ResponseCore —

parseDataFromResponse()

parseDataFromResponse() : \OSS\Model\CorsConfig

Subclass implementation, different requests return data has different analytical logic, implemented by subclasses

Returns

\OSS\Model\CorsConfig —

isResponseOk()

isResponseOk() : bool

Check if the response is OK, according to the http status. [200-299]:OK, the Cors config could be got; [404]: not found--no Cors config.

Returns

bool —

retrieveErrorMessage()

retrieveErrorMessage( $body) : string

Try to get the error message from body

Parameters

$body

Returns

string —

retrieveErrorCode()

retrieveErrorCode( $body) : string

Try to get the error Code from body

Parameters

$body

Returns

string —