Interface AttributeContext.HttpRequestOrBuilder
- All Superinterfaces:
com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder
- All Known Implementing Classes:
AttributeContext.HttpRequest,AttributeContext.HttpRequest.Builder
- Enclosing class:
- AttributeContext
public static interface AttributeContext.HttpRequestOrBuilder
extends com.google.protobuf.MessageOrBuilder
-
Method Summary
Modifier and TypeMethodDescriptionbooleancontainsHeaders(String key) The HTTP request headers.getBody()The HTTP request body.com.google.protobuf.ByteStringThe HTTP request body.This field is always empty, and exists for compatibility reasons.com.google.protobuf.ByteStringThis field is always empty, and exists for compatibility reasons.A list of the raw HTTP request headers.A list of the raw HTTP request headers.Deprecated.intThe HTTP request headers.The HTTP request headers.getHeadersOrDefault(String key, String defaultValue) The HTTP request headers.getHeadersOrThrow(String key) The HTTP request headers.getHost()The HTTP request ``Host`` or ``:authority`` header value.com.google.protobuf.ByteStringThe HTTP request ``Host`` or ``:authority`` header value.getId()The unique ID for a request, which can be propagated to downstream systems.com.google.protobuf.ByteStringThe unique ID for a request, which can be propagated to downstream systems.The HTTP request method, such as ``GET``, ``POST``.com.google.protobuf.ByteStringThe HTTP request method, such as ``GET``, ``POST``.getPath()The request target, as it appears in the first line of the HTTP request.com.google.protobuf.ByteStringThe request target, as it appears in the first line of the HTTP request.The network protocol used with the request, such as "HTTP/1.0", "HTTP/1.1", or "HTTP/2".com.google.protobuf.ByteStringThe network protocol used with the request, such as "HTTP/1.0", "HTTP/1.1", or "HTTP/2".getQuery()This field is always empty, and exists for compatibility reasons.com.google.protobuf.ByteStringThis field is always empty, and exists for compatibility reasons.com.google.protobuf.ByteStringThe HTTP request body in bytes.The HTTP URL scheme, such as ``http`` and ``https``.com.google.protobuf.ByteStringThe HTTP URL scheme, such as ``http`` and ``https``.longgetSize()The HTTP request size in bytes.booleanA list of the raw HTTP request headers.Methods inherited from interface com.google.protobuf.MessageLiteOrBuilder
isInitializedMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getDefaultInstanceForType, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Method Details
-
getId
String 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. For HTTP requests, it should be X-Request-ID or equivalent.
string id = 1;- Returns:
- The id.
-
getIdBytes
com.google.protobuf.ByteString getIdBytes()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. For HTTP requests, it should be X-Request-ID or equivalent.
string id = 1;- Returns:
- The bytes for id.
-
getMethod
String getMethod()The HTTP request method, such as ``GET``, ``POST``.
string method = 2;- Returns:
- The method.
-
getMethodBytes
com.google.protobuf.ByteString getMethodBytes()The HTTP request method, such as ``GET``, ``POST``.
string method = 2;- Returns:
- The bytes for method.
-
getHeadersCount
int getHeadersCount()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 lower-cased, because HTTP header keys are case-insensitive. Header value is encoded as UTF-8 string. Non-UTF-8 characters will be replaced by "!". This field will not be set if :ref:`encode_raw_headers <envoy_v3_api_field_extensions.filters.http.ext_authz.v3.ExtAuthz.encode_raw_headers>` is set to true.
map<string, string> headers = 3 [(.udpa.annotations.field_migrate) = { ... } -
containsHeaders
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 lower-cased, because HTTP header keys are case-insensitive. Header value is encoded as UTF-8 string. Non-UTF-8 characters will be replaced by "!". This field will not be set if :ref:`encode_raw_headers <envoy_v3_api_field_extensions.filters.http.ext_authz.v3.ExtAuthz.encode_raw_headers>` is set to true.
map<string, string> headers = 3 [(.udpa.annotations.field_migrate) = { ... } -
getHeaders
Deprecated.UsegetHeadersMap()instead. -
getHeadersMap
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 lower-cased, because HTTP header keys are case-insensitive. Header value is encoded as UTF-8 string. Non-UTF-8 characters will be replaced by "!". This field will not be set if :ref:`encode_raw_headers <envoy_v3_api_field_extensions.filters.http.ext_authz.v3.ExtAuthz.encode_raw_headers>` is set to true.
map<string, string> headers = 3 [(.udpa.annotations.field_migrate) = { ... } -
getHeadersOrDefault
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 lower-cased, because HTTP header keys are case-insensitive. Header value is encoded as UTF-8 string. Non-UTF-8 characters will be replaced by "!". This field will not be set if :ref:`encode_raw_headers <envoy_v3_api_field_extensions.filters.http.ext_authz.v3.ExtAuthz.encode_raw_headers>` is set to true.
map<string, string> headers = 3 [(.udpa.annotations.field_migrate) = { ... } -
getHeadersOrThrow
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 lower-cased, because HTTP header keys are case-insensitive. Header value is encoded as UTF-8 string. Non-UTF-8 characters will be replaced by "!". This field will not be set if :ref:`encode_raw_headers <envoy_v3_api_field_extensions.filters.http.ext_authz.v3.ExtAuthz.encode_raw_headers>` is set to true.
map<string, string> headers = 3 [(.udpa.annotations.field_migrate) = { ... } -
hasHeaderMap
boolean hasHeaderMap()A list of the raw HTTP request headers. This is used instead of :ref:`headers <envoy_v3_api_field_service.auth.v3.AttributeContext.HttpRequest.headers>` when :ref:`encode_raw_headers <envoy_v3_api_field_extensions.filters.http.ext_authz.v3.ExtAuthz.encode_raw_headers>` is set to true. Note that this is not actually a map type. ``header_map`` contains a single repeated field ``headers``. Here, only the ``key`` and ``raw_value`` fields will be populated for each HeaderValue, and that is only when :ref:`encode_raw_headers <envoy_v3_api_field_extensions.filters.http.ext_authz.v3.ExtAuthz.encode_raw_headers>` is set to true. Also, unlike the :ref:`headers <envoy_v3_api_field_service.auth.v3.AttributeContext.HttpRequest.headers>` field, headers with the same key are not combined into a single comma separated header.
.envoy.config.core.v3.HeaderMap header_map = 13 [(.udpa.annotations.field_migrate) = { ... }- Returns:
- Whether the headerMap field is set.
-
getHeaderMap
HeaderMap getHeaderMap()A list of the raw HTTP request headers. This is used instead of :ref:`headers <envoy_v3_api_field_service.auth.v3.AttributeContext.HttpRequest.headers>` when :ref:`encode_raw_headers <envoy_v3_api_field_extensions.filters.http.ext_authz.v3.ExtAuthz.encode_raw_headers>` is set to true. Note that this is not actually a map type. ``header_map`` contains a single repeated field ``headers``. Here, only the ``key`` and ``raw_value`` fields will be populated for each HeaderValue, and that is only when :ref:`encode_raw_headers <envoy_v3_api_field_extensions.filters.http.ext_authz.v3.ExtAuthz.encode_raw_headers>` is set to true. Also, unlike the :ref:`headers <envoy_v3_api_field_service.auth.v3.AttributeContext.HttpRequest.headers>` field, headers with the same key are not combined into a single comma separated header.
.envoy.config.core.v3.HeaderMap header_map = 13 [(.udpa.annotations.field_migrate) = { ... }- Returns:
- The headerMap.
-
getHeaderMapOrBuilder
HeaderMapOrBuilder getHeaderMapOrBuilder()A list of the raw HTTP request headers. This is used instead of :ref:`headers <envoy_v3_api_field_service.auth.v3.AttributeContext.HttpRequest.headers>` when :ref:`encode_raw_headers <envoy_v3_api_field_extensions.filters.http.ext_authz.v3.ExtAuthz.encode_raw_headers>` is set to true. Note that this is not actually a map type. ``header_map`` contains a single repeated field ``headers``. Here, only the ``key`` and ``raw_value`` fields will be populated for each HeaderValue, and that is only when :ref:`encode_raw_headers <envoy_v3_api_field_extensions.filters.http.ext_authz.v3.ExtAuthz.encode_raw_headers>` is set to true. Also, unlike the :ref:`headers <envoy_v3_api_field_service.auth.v3.AttributeContext.HttpRequest.headers>` field, headers with the same key are not combined into a single comma separated header.
.envoy.config.core.v3.HeaderMap header_map = 13 [(.udpa.annotations.field_migrate) = { ... } -
getPath
String getPath()The request target, as it appears in the first line of the HTTP request. This includes the URL path and query-string. No decoding is performed.
string path = 4;- Returns:
- The path.
-
getPathBytes
com.google.protobuf.ByteString getPathBytes()The request target, as it appears in the first line of the HTTP request. This includes the URL path and query-string. No decoding is performed.
string path = 4;- Returns:
- The bytes for path.
-
getHost
String getHost()The HTTP request ``Host`` or ``:authority`` header value.
string host = 5;- Returns:
- The host.
-
getHostBytes
com.google.protobuf.ByteString getHostBytes()The HTTP request ``Host`` or ``:authority`` header value.
string host = 5;- Returns:
- The bytes for host.
-
getScheme
String getScheme()The HTTP URL scheme, such as ``http`` and ``https``.
string scheme = 6;- Returns:
- The scheme.
-
getSchemeBytes
com.google.protobuf.ByteString getSchemeBytes()The HTTP URL scheme, such as ``http`` and ``https``.
string scheme = 6;- Returns:
- The bytes for scheme.
-
getQuery
String getQuery()This field is always empty, and exists for compatibility reasons. The HTTP URL query is included in ``path`` field.
string query = 7;- Returns:
- The query.
-
getQueryBytes
com.google.protobuf.ByteString getQueryBytes()This field is always empty, and exists for compatibility reasons. The HTTP URL query is included in ``path`` field.
string query = 7;- Returns:
- The bytes for query.
-
getFragment
String getFragment()This field is always empty, and exists for compatibility reasons. The URL fragment is not submitted as part of HTTP requests; it is unknowable.
string fragment = 8;- Returns:
- The fragment.
-
getFragmentBytes
com.google.protobuf.ByteString getFragmentBytes()This field is always empty, and exists for compatibility reasons. The URL fragment is not submitted as part of HTTP requests; it is unknowable.
string fragment = 8;- Returns:
- The bytes for fragment.
-
getSize
long getSize()The HTTP request size in bytes. If unknown, it must be -1.
int64 size = 9;- Returns:
- The size.
-
getProtocol
String getProtocol()The network protocol used with the request, such as "HTTP/1.0", "HTTP/1.1", or "HTTP/2". See :repo:`headers.h:ProtocolStrings <source/common/http/headers.h>` for a list of all possible values.
string protocol = 10;- Returns:
- The protocol.
-
getProtocolBytes
com.google.protobuf.ByteString getProtocolBytes()The network protocol used with the request, such as "HTTP/1.0", "HTTP/1.1", or "HTTP/2". See :repo:`headers.h:ProtocolStrings <source/common/http/headers.h>` for a list of all possible values.
string protocol = 10;- Returns:
- The bytes for protocol.
-
getBody
String getBody()The HTTP request body.
string body = 11;- Returns:
- The body.
-
getBodyBytes
com.google.protobuf.ByteString getBodyBytes()The HTTP request body.
string body = 11;- Returns:
- The bytes for body.
-
getRawBody
com.google.protobuf.ByteString getRawBody()The HTTP request body in bytes. This is used instead of :ref:`body <envoy_v3_api_field_service.auth.v3.AttributeContext.HttpRequest.body>` when :ref:`pack_as_bytes <envoy_v3_api_field_extensions.filters.http.ext_authz.v3.BufferSettings.pack_as_bytes>` is set to true.
bytes raw_body = 12;- Returns:
- The rawBody.
-