GitsHttp class
The base class for an HTTP client.
Constructors
-
GitsHttp({int timeout = 30000, GitsInspector? gitsInspector, bool showLog = true, Map<
String, String> ? headers, AuthTokenOption? authTokenOption, RefreshTokenOption? refreshTokenOption, MiddlewareResponseOption? middlewareResponseOption})
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
-
clearCache(
{String? method, Uri? url}) → Future< void> - It clears the cache
-
close(
) → void -
delete(
Uri url, {Map< String, String> ? headers, Object? body, Encoding? encoding, CacheStrategy? cacheStrategy}) → Future<Response> -
get(
Uri url, {Map< String, String> ? headers, Map<String, dynamic> ? body, CacheStrategy? cacheStrategy}) → Future<Response> -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
patch(
Uri url, {Map< String, String> ? headers, Object? body, Encoding? encoding, CacheStrategy? cacheStrategy}) → Future<Response> -
post(
Uri url, {Map< String, String> ? headers, Object? body, Encoding? encoding, CacheStrategy? cacheStrategy}) → Future<Response> -
postMultipart(
Uri url, {Map< String, File> ? files, Map<String, String> ? headers, Map<String, String> ? body}) → Future<Response> - Sends an HTTP POST multipart request with the given headers, files and body to the given URL.
-
put(
Uri url, {Map< String, String> ? headers, Object? body, Encoding? encoding, CacheStrategy? cacheStrategy}) → Future<Response> -
send(
BaseRequest request) → Future< StreamedResponse> -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited