Google Cloud Apigee Connect V1 Client - Class HttpResponse (1.1.3)

Reference documentation and code samples for the Google Cloud Apigee Connect V1 Client class HttpResponse.

The proto definition of http response.

Generated from protobuf message google.cloud.apigeeconnect.v1.HttpResponse

Namespace

Google \ Cloud \ ApigeeConnect \ V1

Methods

__construct

Constructor.

Parameters
NameDescription
data array

Optional. Data for populating the Message object.

↳ id string

A unique identifier that matches the request ID.

↳ status string

Status of http response, e.g. "200 OK".

↳ status_code int

Status code of http response, e.g. 200.

↳ body string

The HTTP 1.1 response body.

↳ headers array<Google\Cloud\ApigeeConnect\V1\Header>

The HTTP response headers.

↳ content_length int|string

Content length records the length of the associated content. The value -1 indicates that the length is unknown. Unless http method is "HEAD", values >= 0 indicate that the given number of bytes may be read from Body.

getId

A unique identifier that matches the request ID.

Returns
TypeDescription
string

setId

A unique identifier that matches the request ID.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getStatus

Status of http response, e.g. "200 OK".

Returns
TypeDescription
string

setStatus

Status of http response, e.g. "200 OK".

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getStatusCode

Status code of http response, e.g. 200.

Returns
TypeDescription
int

setStatusCode

Status code of http response, e.g. 200.

Parameter
NameDescription
var int
Returns
TypeDescription
$this

getBody

The HTTP 1.1 response body.

Returns
TypeDescription
string

setBody

The HTTP 1.1 response body.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getHeaders

The HTTP response headers.

Returns
TypeDescription
Google\Protobuf\Internal\RepeatedField

setHeaders

The HTTP response headers.

Parameter
NameDescription
var array<Google\Cloud\ApigeeConnect\V1\Header>
Returns
TypeDescription
$this

getContentLength

Content length records the length of the associated content. The value -1 indicates that the length is unknown. Unless http method is "HEAD", values >= 0 indicate that the given number of bytes may be read from Body.

Returns
TypeDescription
int|string

setContentLength

Content length records the length of the associated content. The value -1 indicates that the length is unknown. Unless http method is "HEAD", values >= 0 indicate that the given number of bytes may be read from Body.

Parameter
NameDescription
var int|string
Returns
TypeDescription
$this