RequestData class

A class that mimics HTTP Request in order to intercept it's data.

Constructors

RequestData({required Method method, required String baseUrl, Map<String, String>? headers, Map<String, dynamic>? params, dynamic body, Encoding? encoding})
RequestData.fromHttpRequest(BaseRequest request)
Creates a new request data from an HTTP request.
factory

Properties

baseUrl String
The base URL String to which the request will be sent. It does not include the query parameters.
getter/setter pair
body ↔ dynamic
getter/setter pair
encoding Encoding?
The encoding used for the request.
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
headers Map<String, String>
Map of String to String that represents the headers of the request.
getter/setter pair
method Method
The HTTP method of the request.
getter/setter pair
params Map<String, dynamic>
Map of String to String that represents the query parameters of the request.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
url String
The complete URL String including query parameters to which the request will be sent.
no setter

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toHttpRequest() → Request
Converts this request data to an HTTP request.
toString() String
Convenient toString implementation for logging.
override

Operators

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