ClientRequest class

A request object that can be modified by interceptors.

Constructors

ClientRequest({required String url, required String method, Map<String, String> headers = const {}, dynamic body, Map<String, String>? queryParameters, Map<String, dynamic>? extra})

Properties

body ↔ dynamic
The request body (for POST, PUT, PATCH).
getter/setter pair
extra Map<String, dynamic>
Extra data that can be passed between interceptors.
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
headers Map<String, String>
The request headers.
getter/setter pair
method String
The HTTP method.
getter/setter pair
queryParameters Map<String, String>?
Query parameters.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
url String
The request URL.
getter/setter pair

Methods

copyWith({String? url, String? method, Map<String, String>? headers, dynamic body, Map<String, String>? queryParameters, Map<String, dynamic>? extra}) ClientRequest
Creates a copy of this request with optional modifications.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override

Operators

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