ResponseCore

Container for all response-related methods.

package

LOG_PHP_SDK

Methods

Constructs a new instance of this class.

__construct(array $header, string $body, integer $status = null) : object

Arguments

$header

array

(Required) Associative array of HTTP headers (typically returned by <RequestCore::get_response_header()>).

$body

string

(Required) XML-formatted response from AWS.

$status

integer

(Optional) HTTP response status code from the request.

Response

object

Contains an header property (HTTP headers as an associative array), a or body property, and an status code.

Did we receive the status code we expected?

isOK(integer|array $codes = array(200, 201, 204, 206)) : boolean

Arguments

$codes

integer|array

(Optional) The status code(s) to expect. Pass an for a single acceptable value, or an of integers for multiple acceptable values.

Response

boolean

Whether we received the expected status code or not.

Properties

Stores the HTTP header information.

header : 

Type(s)

Stores the SimpleXML response.

body : 

Type(s)

Stores the HTTP response code.

status : 

Type(s)