Reference documentation and code samples for the Google Cloud Network Services V1 Client class HttpDirectResponse.
Static HTTP response object to be returned.
Generated from protobuf message google.cloud.networkservices.v1.HttpRoute.HttpDirectResponse
Namespace
Google \ Cloud \ NetworkServices \ V1 \ HttpRouteMethods
__construct
Constructor.
Parameters | |
---|---|
Name | Description |
data |
array
Optional. Data for populating the Message object. |
↳ string_body |
string
Optional. Response body as a string. Maximum body length is 1024 characters. |
↳ bytes_body |
string
Optional. Response body as bytes. Maximum body size is 4096B. |
↳ status |
int
Required. Status to return as part of HTTP Response. Must be a positive integer. |
getStringBody
Optional. Response body as a string. Maximum body length is 1024 characters.
Returns | |
---|---|
Type | Description |
string |
hasStringBody
setStringBody
Optional. Response body as a string. Maximum body length is 1024 characters.
Parameter | |
---|---|
Name | Description |
var |
string
|
Returns | |
---|---|
Type | Description |
$this |
getBytesBody
Optional. Response body as bytes. Maximum body size is 4096B.
Returns | |
---|---|
Type | Description |
string |
hasBytesBody
setBytesBody
Optional. Response body as bytes. Maximum body size is 4096B.
Parameter | |
---|---|
Name | Description |
var |
string
|
Returns | |
---|---|
Type | Description |
$this |
getStatus
Required. Status to return as part of HTTP Response. Must be a positive integer.
Returns | |
---|---|
Type | Description |
int |
setStatus
Required. Status to return as part of HTTP Response. Must be a positive integer.
Parameter | |
---|---|
Name | Description |
var |
int
|
Returns | |
---|---|
Type | Description |
$this |
getHttpBody
Returns | |
---|---|
Type | Description |
string |