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. bool sendContentLength = true,
  7. int maxAuthRetries = 1,
  8. bool allowAutoSignedCert = false,
  9. String? baseUrl,
  10. List<TrustedCertificate>? trustedCertificates,
  11. bool withCredentials = false,
  12. String findProxy(
    1. Uri url
    )?,
  13. 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();