HttpRequest class

A common proto for logging HTTP requests.

Only contains semantics defined by the HTTP specification. Product-specific logging information MUST be defined in a separate message.

Constructors

HttpRequest({String? cacheFillBytes, bool? cacheHit, bool? cacheLookup, bool? cacheValidatedWithOriginServer, String? latency, String? protocol, String? referer, String? remoteIp, String? requestMethod, String? requestSize, String? requestUrl, String? responseSize, String? serverIp, int? status, String? userAgent})
HttpRequest.fromJson(Map json_)

Properties

cacheFillBytes String?
The number of HTTP response bytes inserted into cache.
getter/setter pair
cacheHit bool?
Whether or not an entity was served from cache (with or without validation).
getter/setter pair
cacheLookup bool?
Whether or not a cache lookup was attempted.
getter/setter pair
cacheValidatedWithOriginServer bool?
Whether or not the response was validated with the origin server before being served from cache.
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
latency String?
The request processing latency on the server, from the time the request was received until the response was sent.
getter/setter pair
protocol String?
Protocol used for the request.
getter/setter pair
referer String?
The referer URL of the request, as defined in HTTP/1.1 Header Field Definitions (https://datatracker.ietf.org/doc/html/rfc2616#section-14.36).
getter/setter pair
remoteIp String?
The IP address (IPv4 or IPv6) of the client that issued the HTTP request.
getter/setter pair
requestMethod String?
The request method.
getter/setter pair
requestSize String?
The size of the HTTP request message in bytes, including the request headers and the request body.
getter/setter pair
requestUrl String?
The scheme (http, https), the host name, the path and the query portion of the URL that was requested.
getter/setter pair
responseSize String?
The size of the HTTP response message sent back to the client, in bytes, including the response headers and the response body.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
serverIp String?
The IP address (IPv4 or IPv6) of the origin server that the request was sent to.
getter/setter pair
status int?
The response code indicating the status of response.
getter/setter pair
userAgent String?
The user agent sent by the client.
getter/setter pair

Methods

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

Operators

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