Requests class
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
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, {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>
-
-
Gets the cookies of a
Response.headers
in the form of a CookieJar.
-
get(String url, {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.
-
head(String url, {Map<String, dynamic>? queryParameters, int? port, RequestBodyEncoding bodyEncoding = defaultBodyEncoding, int timeoutSeconds = defaultTimeoutSeconds, bool persistCookies = true, bool verify = true, bool withCredentials = false})
→ Future<Response>
-
-
patch(String url, {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, 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, 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.