Requests class

Constructors

Requests()
const

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

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

Static Properties

onError → Event
final

Static Methods

addCookie(String hostname, String name, String value) Future
Add a cookie with its name and value to the hostname associated CookieJar.
clearStoredCookies(String hostname) Future
Removes hostname and its associated value, if present, from the cache.
delete(String url, {Map<String, String>? headers, dynamic json, dynamic body, Map<String, dynamic>? queryParameters, int? port, RequestBodyEncoding bodyEncoding = defaultBodyEncoding, int timeoutSeconds = defaultTimeoutSeconds, bool persistCookies = true, bool verify = true, bool withCredentials = false}) Future<Response>
extractResponseCookies(Map<String, String> responseHeaders) CookieJar
Gets the cookies of a Response.headers in the form of a CookieJar.
get(String url, {Map<String, String>? headers, Map<String, dynamic>? queryParameters, int? port, dynamic json, dynamic body, RequestBodyEncoding bodyEncoding = defaultBodyEncoding, int timeoutSeconds = defaultTimeoutSeconds, bool persistCookies = true, bool verify = true, bool withCredentials = false}) Future<Response>
getHostname(String url) String
getStoredCookies(String hostname) Future<CookieJar>
Get the CookieJar for the given hostname, or an empty CookieJar if the hostname is not in the cache.
patch(String url, {Map<String, String>? headers, int? port, dynamic json, dynamic body, Map<String, dynamic>? queryParameters, RequestBodyEncoding bodyEncoding = defaultBodyEncoding, int timeoutSeconds = defaultTimeoutSeconds, bool persistCookies = true, bool verify = true, bool withCredentials = false}) Future<Response>
post(String url, {dynamic json, int? port, dynamic body, Map<String, dynamic>? queryParameters, RequestBodyEncoding bodyEncoding = defaultBodyEncoding, Map<String, String>? headers, int timeoutSeconds = defaultTimeoutSeconds, bool persistCookies = true, bool verify = true, bool withCredentials = false}) Future<Response>
put(String url, {int? port, dynamic json, dynamic body, Map<String, dynamic>? queryParameters, RequestBodyEncoding bodyEncoding = defaultBodyEncoding, Map<String, String>? headers, int timeoutSeconds = defaultTimeoutSeconds, bool persistCookies = true, bool verify = true, bool withCredentials = false}) Future<Response>
setStoredCookies(String hostname, CookieJar cookies) Future
Associates the hostname with the given cookies into the cache.