GetHttpClient constructor
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,
Implementation
GetHttpClient({
this.userAgent = 'getx-client',
this.timeout = const Duration(seconds: 8),
this.followRedirects = true,
this.maxRedirects = 5,
this.sendUserAgent = false,
this.sendContentLength = true,
this.maxAuthRetries = 1,
bool allowAutoSignedCert = false,
this.baseUrl,
List<TrustedCertificate>? trustedCertificates,
bool withCredentials = false,
String Function(Uri url)? findProxy,
IClient? customClient,
}) : _httpClient = customClient ??
createHttp(
allowAutoSignedCert: allowAutoSignedCert,
trustedCertificates: trustedCertificates,
withCredentials: withCredentials,
findProxy: findProxy,
),
_modifier = GetModifier();