HTTPMatchRequest class

HttpMatchRequest specifies a set of criterion to be met in order for the rule to be applied to the HTTP request. For example, the following restricts the rule to match only requests where the URL path starts with /ratings/v2/ and the request contains a custom end-user header with value jason.

Constructors

HTTPMatchRequest({String? name, StringMatch? uri, StringMatch? scheme, StringMatch? method, StringMatch? authority, Map<String, StringMatch>? headers, int? port, Map<String, String>? sourceLabels, List<String>? gateways, Map<String, StringMatch>? queryParams, bool? ignoreUriCase, Map<String, StringMatch>? withoutHeaders, String? sourceNamespace})
The main constructor.
HTTPMatchRequest.fromJson(Map<String, dynamic> json)
Creates a HTTPMatchRequest from JSON data.

Properties

authority StringMatch?
HTTP Authority values are case-sensitive and formatted as follows:
final
gateways List<String>?
Names of gateways where the rule should be applied. Gateway names in the top-level gateways field of the VirtualService (if any) are overridden. The gateway match is independent of sourceLabels.
final
hashCode int
The hash code for this object.
no setterinherited
headers Map<String, StringMatch>?
The header keys must be lowercase and use hyphen as the separator, e.g. x-request-id.
final
ignoreUriCase bool?
Flag to specify whether the URI matching should be case-insensitive.
final
method StringMatch?
HTTP Method values are case-sensitive and formatted as follows:
final
name String?
The name assigned to a match. The match’s name will be concatenated with the parent route’s name and will be logged in the access logs for requests matching this route.
final
port int?
Specifies the ports on the host that is being addressed. Many services only expose a single port or label ports with the protocols they support, in these cases it is not required to explicitly select the port.
final
queryParams Map<String, StringMatch>?
Query parameters for matching.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scheme StringMatch?
URI Scheme values are case-sensitive and formatted as follows:
final
sourceLabels Map<String, String>?
One or more labels that constrain the applicability of a rule to workloads with the given labels. If the VirtualService has a list of gateways specified in the top-level gateways field, it must include the reserved gateway mesh for this field to be applicable.
final
sourceNamespace String?
Source namespace constraining the applicability of a rule to workloads in that namespace. If the VirtualService has a list of gateways specified in the top-level gateways field, it must include the reserved gateway mesh for this field to be applicable.
final
uri StringMatch?
URI to match values are case-sensitive and formatted as follows:
final
withoutHeaders Map<String, StringMatch>?
withoutHeader has the same syntax with the header, but has opposite meaning. If a header is matched with a matching rule among withoutHeader, the traffic becomes not matched one.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited