SentryRequest.fromJson constructor

SentryRequest.fromJson(
  1. Map<String, dynamic> json
)

Deserializes a SentryRequest from JSON Map.

Implementation

factory SentryRequest.fromJson(Map<String, dynamic> json) {
  return SentryRequest(
    url: json['url'],
    method: json['method'],
    queryString: json['query_string'],
    cookies: json['cookies'],
    data: json['data'],
    headers: json.containsKey('headers') ? Map.from(json['headers']) : null,
    env: json.containsKey('env') ? Map.from(json['env']) : null,
    // ignore: deprecated_member_use_from_same_package
    other: json.containsKey('other') ? Map.from(json['other']) : null,
    fragment: json['fragment'],
    apiTarget: json['api_target'],
  );
}