GetHttpClient class

Constructors

GetHttpClient({String userAgent = 'getx-client', Duration timeout = const Duration(seconds: 8), bool followRedirects = true, int maxRedirects = 5, bool sendUserAgent = false, bool sendContentLength = true, int maxAuthRetries = 1, bool allowAutoSignedCert = false, String? baseUrl, List<TrustedCertificate>? trustedCertificates, bool withCredentials = false, String findProxy(Uri url)?, IClient? customClient})

Properties

baseUrl ↔ String?
getter/setter pair
defaultContentType ↔ String
getter/setter pair
defaultDecoder ↔ Decoder?
getter/setter pair
defaultResponseInterceptor ↔ ResponseInterceptor?
getter/setter pair
errorSafety ↔ bool
getter/setter pair
findProxy ↔ String Function(Uri url)?
getter/setter pair
followRedirects ↔ bool
getter/setter pair
hashCode → int
The hash code for this object.
no setterinherited
maxAuthRetries ↔ int
getter/setter pair
maxRedirects ↔ int
getter/setter pair
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
sendContentLength ↔ bool
getter/setter pair
sendUserAgent ↔ bool
getter/setter pair
timeout ↔ Duration
getter/setter pair
userAgent ↔ String
getter/setter pair

Methods

addAuthenticator<T>(RequestModifier<T> auth) → void
addRequestModifier<T>(RequestModifier<T> interceptor) → void
addResponseModifier<T>(ResponseModifier<T> interceptor) → void
close() → void
createUri(String? url, Map<String, dynamic>? query) → Uri
delete<T>(String url, {Map<String, String>? headers, String? contentType, Map<String, dynamic>? query, Decoder<T>? decoder, ResponseInterceptor<T>? responseInterceptor}) → Future<Response<T>>
get<T>(String url, {Map<String, String>? headers, String? contentType, Map<String, dynamic>? query, Decoder<T>? decoder, ResponseInterceptor<T>? responseInterceptor}) → Future<Response<T>>
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
patch<T>(String url, {dynamic body, String? contentType, Map<String, String>? headers, Map<String, dynamic>? query, Decoder<T>? decoder, ResponseInterceptor<T>? responseInterceptor, Progress? uploadProgress}) → Future<Response<T>>
post<T>(String? url, {dynamic body, String? contentType, Map<String, String>? headers, Map<String, dynamic>? query, Decoder<T>? decoder, ResponseInterceptor<T>? responseInterceptor, Progress? uploadProgress}) → Future<Response<T>>
put<T>(String url, {dynamic body, String? contentType, Map<String, String>? headers, Map<String, dynamic>? query, Decoder<T>? decoder, ResponseInterceptor<T>? responseInterceptor, Progress? uploadProgress}) → Future<Response<T>>
removeRequestModifier<T>(RequestModifier<T> interceptor) → void
removeResponseModifier<T>(ResponseModifier<T> interceptor) → void
request<T>(String url, String method, {dynamic body, String? contentType, Map<String, String>? headers, Map<String, dynamic>? query, Decoder<T>? decoder, ResponseInterceptor<T>? responseInterceptor, Progress? uploadProgress}) → Future<Response<T>>
send<T>(Request<T> request) → Future<Response<T>>
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited