\Microsoft\Graph\HttpGraphResponse

Class GraphResponse

Summary

Methods
Properties
Constants
__construct()
getBody()
getRawBody()
getStatus()
getHeaders()
getResponseAsObject()
getSkipToken()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
_decodeBody()
$_body
$_decodedBody
$_headers
$_httpStatusCode
N/A

Properties

$_body

$_body : string

The body of the response

Type

string

$_decodedBody

$_decodedBody : \Microsoft\Graph\Http\array(string)

The body of the response, decoded into an array

Type

\Microsoft\Graph\Http\array(string)

$_headers

$_headers : \Microsoft\Graph\Http\array(string)

The headers of the response

Type

\Microsoft\Graph\Http\array(string)

$_httpStatusCode

$_httpStatusCode : string

The status code of the response

Type

string

Methods

__construct()

__construct(\Microsoft\Graph\Http\HttpRequest  $request, string  $body = null, string  $httpStatusCode = null, array  $headers = array()) 

Creates a new Graph HTTP response entity

Parameters

\Microsoft\Graph\Http\HttpRequest $request

The request

string $body

The body of the response

string $httpStatusCode

The returned status code

array $headers

The returned headers

getBody()

getBody() : array

Get the decoded body of the HTTP response

Returns

array —

The decoded body

getRawBody()

getRawBody() : array

Get the undecoded body of the HTTP response

Returns

array —

The undecoded body

getStatus()

getStatus() : string

Get the status of the HTTP response

Returns

string —

The HTTP status

getHeaders()

getHeaders() : array

Get the headers of the response

Returns

array —

The response headers

getResponseAsObject()

getResponseAsObject(mixed  $returnType) : \Microsoft\Graph\Http\An

Converts the respsonse JSON object to a Graph SDK object

Parameters

mixed $returnType

The type to convert the object(s) to

Returns

\Microsoft\Graph\Http\An —

object or array of objects of type $returnType

getSkipToken()

getSkipToken() : \Microsoft\Graph\Http\The

Gets the skip token of a response object from OData

Returns

\Microsoft\Graph\Http\The —

skip token, if provided

_decodeBody()

_decodeBody() : array

Decode the JSON response into an array

Returns

array —

The decoded response