Reference documentation and code samples for the Google API Common Protos Client class Request.
This message defines attributes for an HTTP request. If the actual request is not an HTTP request, the runtime system should try to map the actual request to an equivalent HTTP request.
Generated from protobuf message google.rpc.context.AttributeContext.Request
Namespace
Google \ Rpc \ Context \ AttributeContextMethods
__construct
Constructor.
data
array
Optional. Data for populating the Message object.
↳ id
string
The unique ID for a request, which can be propagated to downstream systems. The ID should have low probability of collision within a single day for a specific service.
↳ method
string
The HTTP request method, such as GET
, POST
.
↳ headers
array| Google\Protobuf\Internal\MapField
The HTTP request headers. If multiple headers share the same key, they must be merged according to the HTTP spec. All header keys must be lowercased, because HTTP header keys are case-insensitive.
↳ path
string
The HTTP URL path, excluding the query parameters.
↳ host
string
The HTTP request Host
header value.
↳ scheme
string
The HTTP URL scheme, such as http
and https
.
↳ query
string
The HTTP URL query in the format of name1=value1&name2=value2
, as it appears in the first line of the HTTP request. No decoding is performed.
↳ time
Google\Protobuf\Timestamp
The timestamp when the destination
service receives the last byte of the request.
↳ size
int|string
The HTTP request size in bytes. If unknown, it must be -1.
↳ protocol
string
The network protocol used with the request, such as "http/1.1", "spdy/3", "h2", "h2c", "webrtc", "tcp", "udp", "quic". See https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#alpn-protocol-ids for details.
↳ reason
string
A special parameter for request reason. It is used by security systems to associate auditing information with a request.
↳ auth
Auth
The request authentication. May be absent for unauthenticated requests. Derived from the HTTP request Authorization
header or equivalent.
getId
The unique ID for a request, which can be propagated to downstream systems. The ID should have low probability of collision within a single day for a specific service.
string
setId
The unique ID for a request, which can be propagated to downstream systems. The ID should have low probability of collision within a single day for a specific service.
var
string
$this
getMethod
The HTTP request method, such as GET
, POST
.
string
setMethod
The HTTP request method, such as GET
, POST
.
var
string
$this
getHeaders
The HTTP request headers. If multiple headers share the same key, they must be merged according to the HTTP spec. All header keys must be lowercased, because HTTP header keys are case-insensitive.
setHeaders
The HTTP request headers. If multiple headers share the same key, they must be merged according to the HTTP spec. All header keys must be lowercased, because HTTP header keys are case-insensitive.
$this
getPath
The HTTP URL path, excluding the query parameters.
string
setPath
The HTTP URL path, excluding the query parameters.
var
string
$this
getHost
The HTTP request Host
header value.
string
setHost
The HTTP request Host
header value.
var
string
$this
getScheme
The HTTP URL scheme, such as http
and https
.
string
setScheme
The HTTP URL scheme, such as http
and https
.
var
string
$this
getQuery
The HTTP URL query in the format of name1=value1&name2=value2
, as it
appears in the first line of the HTTP request. No decoding is performed.
string
setQuery
The HTTP URL query in the format of name1=value1&name2=value2
, as it
appears in the first line of the HTTP request. No decoding is performed.
var
string
$this
getTime
The timestamp when the destination
service receives the last byte of
the request.
hasTime
clearTime
setTime
The timestamp when the destination
service receives the last byte of
the request.
$this
getSize
The HTTP request size in bytes. If unknown, it must be -1.
int|string
setSize
The HTTP request size in bytes. If unknown, it must be -1.
var
int|string
$this
getProtocol
The network protocol used with the request, such as "http/1.1", "spdy/3", "h2", "h2c", "webrtc", "tcp", "udp", "quic". See https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#alpn-protocol-ids for details.
string
setProtocol
The network protocol used with the request, such as "http/1.1", "spdy/3", "h2", "h2c", "webrtc", "tcp", "udp", "quic". See https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#alpn-protocol-ids for details.
var
string
$this
getReason
A special parameter for request reason. It is used by security systems to associate auditing information with a request.
string
setReason
A special parameter for request reason. It is used by security systems to associate auditing information with a request.
var
string
$this
getAuth
The request authentication. May be absent for unauthenticated requests.
Derived from the HTTP request Authorization
header or equivalent.
hasAuth
clearAuth
setAuth
The request authentication. May be absent for unauthenticated requests.
Derived from the HTTP request Authorization
header or equivalent.
$this