GetHttpClient constructor

GetHttpClient({
  1. String userAgent = 'getx-client',
  2. Duration timeout = const Duration(seconds: 8),
  3. bool followRedirects = true,
  4. int maxRedirects = 5,
  5. bool sendUserAgent = false,
  6. int maxAuthRetries = 1,
  7. bool allowAutoSignedCert = false,
  8. String? baseUrl,
  9. List<TrustedCertificate>? trustedCertificates,
  10. bool withCredentials = false,
  11. String findProxy(
    1. Uri url
    )?,
})

Implementation

GetHttpClient({
  this.userAgent = 'getx-client',
  this.timeout = const Duration(seconds: 8),
  this.followRedirects = true,
  this.maxRedirects = 5,
  this.sendUserAgent = false,
  this.maxAuthRetries = 1,
  bool allowAutoSignedCert = false,
  this.baseUrl,
  List<TrustedCertificate>? trustedCertificates,
  bool withCredentials = false,
  String Function(Uri url)? findProxy,
})  : _httpClient = platform.HttpRequestImpl(
        allowAutoSignedCert: allowAutoSignedCert,
        trustedCertificates: trustedCertificates,
        withCredentials: withCredentials,
        findProxy: findProxy,
      ),
      _modifier = GetModifier();