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.
- Available extensions
- Annotations
-
- @immutable
Constructors
-
SentryRequest({String? url, String? method, String? queryString, String? cookies, String? fragment, String? apiTarget, dynamic data, Map<
String, String> ? headers, Map<String, String> ? env, @Deprecated('Will be removed in v8. Use [data] instead') Map<String, String> ? other, 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, @Deprecated('Will be removed in v8. Use [data] instead') Map<String, String> ? other}) -
factory
Properties
- apiTarget → String?
-
The API target/specification that made the request.
Values can be
graphql
,rest
, etc.final -
The cookie values as string.
final
- 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.
final
- 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.
no setter
- method → String?
-
The HTTP method of the request.
final
-
other
→ Map<
String, String> -
no setter
- queryString → String?
-
The query string component of the URL.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
unknown
→ Map<
String, dynamic> ? -
final
- 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.
final
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, Map<String, String> ? other}) → SentryRequest -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
sanitized(
) → SentryRequest -
Available on SentryRequest, provided by the SanitizedSentryRequest extension
-
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