SentryRequest.fromUri constructor

SentryRequest.fromUri({
  1. required Uri uri,
  2. String? method,
  3. String? cookies,
  4. dynamic data,
  5. Map<String, String>? headers,
  6. Map<String, String>? env,
  7. String? apiTarget,
  8. @Deprecated('Will be removed in v8. Use [data] instead') Map<String, String>? other,
})

Implementation

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,
}) {
  return SentryRequest(
    url: uri.toString(),
    method: method,
    cookies: cookies,
    data: data,
    headers: headers,
    env: env,
    queryString: uri.query,
    fragment: uri.fragment,
    // ignore: deprecated_member_use_from_same_package
    other: other,
    apiTarget: apiTarget,
  ).sanitized();
}