Http class

Static methods for quickly sending HTTP requests.

Constructors

Http()

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 Methods

delete(Uri uri, {Map<String, String>? headers, TransportPlatform? transportPlatform, bool? withCredentials}) Future<Response>
Sends a DELETE request to uri. Includes request headers if given.
get(Uri uri, {Map<String, String>? headers, TransportPlatform? transportPlatform, bool? withCredentials}) Future<Response>
Sends a GET request to uri. Includes request headers if given.
Sends a HEAD request to uri. Includes request headers if given.
options(Uri uri, {Map<String, String>? headers, TransportPlatform? transportPlatform, bool? withCredentials}) Future<Response>
Sends an OPTIONS request to uri. Includes request headers if given.
patch(Uri uri, {String? body, Map<String, String>? headers, TransportPlatform? transportPlatform, bool? withCredentials}) Future<Response>
Sends a PATCH request to uri. Includes request headers and a request body if given.
post(Uri uri, {String? body, Map<String, String>? headers, TransportPlatform? transportPlatform, bool? withCredentials}) Future<Response>
Sends a POST request to uri. Includes request headers and a request body if given.
put(Uri uri, {String? body, Map<String, String>? headers, TransportPlatform? transportPlatform, bool? withCredentials}) Future<Response>
Sends a PUT request to uri. Includes request headers and a request body if given.
send(String method, Uri uri, {String? body, Map<String, String>? headers, TransportPlatform? transportPlatform, bool? withCredentials}) Future<Response>
Sends a request to uri using the HTTP method specified by method. Includes request headers and a request body if given.
streamDelete(Uri uri, {Map<String, String>? headers, TransportPlatform? transportPlatform, bool? withCredentials}) Future<StreamedResponse>
Sends a DELETE request to uri and returns a StreamedResponse. Includes request headers if given.
streamGet(Uri uri, {Map<String, String>? headers, TransportPlatform? transportPlatform, bool? withCredentials}) Future<StreamedResponse>
Sends a GET request to uri and returns a StreamedResponse. Includes request headers if given.
streamHead(Uri uri, {Map<String, String>? headers, TransportPlatform? transportPlatform, bool? withCredentials}) Future<StreamedResponse>
Sends a HEAD request to uri and returns a StreamedResponse. Includes request headers if given.
streamOptions(Uri uri, {Map<String, String>? headers, TransportPlatform? transportPlatform, bool? withCredentials}) Future<StreamedResponse>
Sends an OPTIONS request to uri and returns a StreamedResponse. Includes request headers if given.
streamPatch(Uri uri, {String? body, Map<String, String>? headers, TransportPlatform? transportPlatform, bool? withCredentials}) Future<StreamedResponse>
Sends a PATCH request to uri and returns a StreamedResponse. Includes request headers and a request body if given.
streamPost(Uri uri, {String? body, Map<String, String>? headers, TransportPlatform? transportPlatform, bool? withCredentials}) Future<StreamedResponse>
Sends a POST request to uri and returns a StreamedResponse. Includes request headers and a request body if given.
streamPut(Uri uri, {String? body, Map<String, String>? headers, TransportPlatform? transportPlatform, bool? withCredentials}) Future<StreamedResponse>
Sends a PUT request to uri and returns a StreamedResponse. Includes request headers and a request body if given.
streamSend(String method, Uri uri, {String? body, Map<String, String>? headers, TransportPlatform? transportPlatform, bool? withCredentials}) Future<StreamedResponse>
Sends a request to uri using the HTTP method specified by method and returns a StreamedResponse. Includes request headers and a request body if given.