HttpRequest class

Represents an HTTP request.

Constructors

HttpRequest({String? method, String? url, Object? content, Map<String, String>? headers, String? responseType, AbortSignal? abortSignal, int? timeout, bool? withCredentials})

Properties

abortSignal AbortSignal?
An AbortSignal that can be monitored for cancellation.
getter/setter pair
content Object?
The body content for the request. May be a string or an ArrayBuffer (for binary data).
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
headers Map<String, String>?
An object describing headers to apply to the request.
getter/setter pair
method String?
The HTTP method to use for the request.
getter/setter pair
responseType String?
The XMLHTTPRequestResponseType to apply to the request.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
timeout int?
The time to wait for the request to complete before throwing a TimeoutError. Measured in milliseconds.
getter/setter pair
url String?
The URL for the request.
getter/setter pair
withCredentials bool?
This controls whether credentials such as cookies are sent in cross-site requests.
getter/setter pair

Methods

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