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 requestheaders
if given. -
get(
Uri uri, {Map< String, String> ? headers, TransportPlatform? transportPlatform, bool? withCredentials}) → Future<Response> -
Sends a GET request to
uri
. Includes requestheaders
if given. -
head(
Uri uri, {Map< String, String> ? headers, TransportPlatform? transportPlatform, bool? withCredentials}) → Future<Response> -
Sends a HEAD request to
uri
. Includes requestheaders
if given. -
options(
Uri uri, {Map< String, String> ? headers, TransportPlatform? transportPlatform, bool? withCredentials}) → Future<Response> -
Sends an OPTIONS request to
uri
. Includes requestheaders
if given. -
patch(
Uri uri, {String? body, Map< String, String> ? headers, TransportPlatform? transportPlatform, bool? withCredentials}) → Future<Response> -
Sends a PATCH request to
uri
. Includes requestheaders
and a requestbody
if given. -
post(
Uri uri, {String? body, Map< String, String> ? headers, TransportPlatform? transportPlatform, bool? withCredentials}) → Future<Response> -
Sends a POST request to
uri
. Includes requestheaders
and a requestbody
if given. -
put(
Uri uri, {String? body, Map< String, String> ? headers, TransportPlatform? transportPlatform, bool? withCredentials}) → Future<Response> -
Sends a PUT request to
uri
. Includes requestheaders
and a requestbody
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 bymethod
. Includes requestheaders
and a requestbody
if given. -
streamDelete(
Uri uri, {Map< String, String> ? headers, TransportPlatform? transportPlatform, bool? withCredentials}) → Future<StreamedResponse> -
Sends a DELETE request to
uri
and returns aStreamedResponse
. Includes requestheaders
if given. -
streamGet(
Uri uri, {Map< String, String> ? headers, TransportPlatform? transportPlatform, bool? withCredentials}) → Future<StreamedResponse> -
Sends a GET request to
uri
and returns aStreamedResponse
. Includes requestheaders
if given. -
streamHead(
Uri uri, {Map< String, String> ? headers, TransportPlatform? transportPlatform, bool? withCredentials}) → Future<StreamedResponse> -
Sends a HEAD request to
uri
and returns aStreamedResponse
. Includes requestheaders
if given. -
streamOptions(
Uri uri, {Map< String, String> ? headers, TransportPlatform? transportPlatform, bool? withCredentials}) → Future<StreamedResponse> -
Sends an OPTIONS request to
uri
and returns aStreamedResponse
. Includes requestheaders
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 aStreamedResponse
. Includes requestheaders
and a requestbody
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 aStreamedResponse
. Includes requestheaders
and a requestbody
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 aStreamedResponse
. Includes requestheaders
and a requestbody
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 bymethod
and returns aStreamedResponse
. Includes requestheaders
and a requestbody
if given.