Request class base

A server Request

An equality test on a Request is an equality test on the url

Implementers

Constructors

Request({required String url, Map<String, String>? urlQueryParameters, Map<String, String> headers = const {}, String? httpRequestMethod, dynamic post, int retries = 0, DateTime? creationTime})
Creates a Request
Request.fromJson(Map<String, dynamic> json)
Creates object from json

Properties

creationTime DateTime
Time at which this request was first created
final
hashCode int
The hash code for this object.
no setteroverride
headers Map<String, String>
potential additional headers to send with the request
final
hostName String
Hostname represented by the url. Throws FormatException if url cannot be parsed, and returns empty string if no host in url
no setter
httpRequestMethod String
HTTP request method to use
final
post String?
Set post to make the request using POST instead of GET. In the constructor, post must be one of the following:
final
retries int
Maximum number of retries the downloader should attempt
final
retriesRemaining int
Number of retries remaining
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
url String
String representation of the url, urlEncoded
final
validHttpMethods List<String>
final

Methods

decreaseRetriesRemaining() → void
Decrease retriesRemaining by one
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
Creates JSON map of this object
toString() String
A string representation of this object.
override

Operators

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

Static Methods

cookieHeader(dynamic cookies, String url) Map<String, String>
Returns the cookie header appropriate for this request, taken from the cookies list.
cookiesFromSetCookie(String setCookie) List<Cookie>
Returns a list of Cookies extracted from the setCookie string, which is the value of the 'Set-Cookie' header of a server response