OAuth2Response

A response from a fetch request.

This class represents a secure response from a Oauth2 fetch call.

A fetch is a simplified HTTP response from a protected resource.

package

Default

Methods

__construct

__construct() 

The HTTP response body as a buffer

body() : \io\vertx\jphp\core\buffer\Buffer

Response

\io\vertx\jphp\core\buffer\Buffer

a buffer with the HTTP response body

Looks up a HTTP response header by name, in case where the response is a list of headers, the first one is returned.

getHeader( $arg0) : string

Arguments

$arg0

string

Response

string

the single value for the header.

The HTTP response headers from the HTTP layer.

headers() : \io\vertx\jphp\core\MultiMap

Response

\io\vertx\jphp\core\MultiMap

the HTTP headers

Helper to analize the response body. The test is performed against the header Content-Type, the content of the body is not analyzed.

is( $arg0) : boolean

Arguments

$arg0

string

Response

boolean

true if the header matches

The HTTP response body as a JsonArray

jsonArray() : array

Response

array

a JsonArray from the HTTP response body

The HTTP response body as a JsonObject

jsonObject() : array

Response

array

a JsonObject from the HTTP response body

the returned status code from the HTTP layer.

statusCode() : integer

Response

integer

HTTP status code