SentryRequest class

The Request interface contains information on a HTTP request related to the event. In client SDKs, this can be an outgoing request, or the request that rendered the current web page. On server SDKs, this could be the incoming web request that is being handled.

Constructors

SentryRequest({String? url, String? method, String? queryString, String? cookies, String? fragment, String? apiTarget, dynamic data, Map<String, String>? headers, Map<String, String>? env, Map<String, dynamic>? unknown})
SentryRequest.fromJson(Map<String, dynamic> data)
Deserializes a SentryRequest from JSON Map.
factory
SentryRequest.fromUri({required Uri uri, String? method, String? cookies, dynamic data, Map<String, String>? headers, Map<String, String>? env, String? apiTarget})
factory

Properties

apiTarget String?
The API target/specification that made the request. Values can be graphql, rest, etc.
getter/setter pair
cookies String?
The cookie values as string.
getter/setter pair
data → dynamic
Submitted data in a format that makes the most sense. SDKs should discard large bodies by default. Can be given as string or structural data of any format.
no setter
env Map<String, String>
An immutable dictionary containing environment information passed from the server. This is where information such as CGI/WSGI/Rack keys go that are not HTTP headers.
no setter
fragment String?
The fragment of the request URL.
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
headers Map<String, String>
An immutable dictionary of submitted headers. If a header appears multiple times it, needs to be merged according to the HTTP standard for header merging. Header names are treated case-insensitively by Sentry.
getter/setter pair
method String?
The HTTP method of the request.
getter/setter pair
queryString String?
The query string component of the URL.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
url String?
The URL of the request if available. The query string can be declared either as part of the url, or separately in queryString.
getter/setter pair

Methods

copyWith({String? url, String? method, String? queryString, String? cookies, String? fragment, dynamic data, Map<String, String>? headers, Map<String, String>? env, bool removeCookies = false, String? apiTarget}) SentryRequest
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
Produces a Map that can be serialized to JSON.
toString() String
A string representation of this object.
inherited

Operators

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