Request class

Constructors

Request(String method, Uri url, {Map<String, String> headers = const {}, Map<String, List<String>> headersAll = const {}, Encoding? encoding, String? contentType, Stream<List<int>>? body})

Properties

body Stream<List<int>>?
Body
final
contentType String?
Content type
final
encoding Encoding?
Encoding
final
hashCode int
The hash code for this object.
no setterinherited
headers Map<String, String>
Headers
final
headersAll Map<String, List<String>>
All headers
final
method String
Method
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
url Uri
Uri
final

Methods

getParam(String key, {dynamic defaultValue}) → dynamic
Get parameter with matching key or return default value
getParams() Future<Map<String, dynamic>>
Get all the parameters
getPayload(String key, {dynamic defaultValue}) → dynamic
Get payload
getQuery(String key, {dynamic defaultValue}) → dynamic
Get query parameter
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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

Constants

delete → const String
DELETE method
get → const String
GET method
HEAD method
options → const String
OPTIONS method
patch → const String
PATCH method
post → const String
POST method
put → const String
PUT method