|
|
@ -79,8 +79,8 @@ class SimpleHttpClient { |
|
|
|
final Duration timeout; |
|
|
|
|
|
|
|
HttpClient _httpClient; |
|
|
|
List<RequestInterceptor> _requestInterceptors = new List(); |
|
|
|
List<ResponseInterceptor> _responseInterceptors = new List(); |
|
|
|
List<RequestInterceptor> _requestInterceptors = List(); |
|
|
|
List<ResponseInterceptor> _responseInterceptors = List(); |
|
|
|
RequestInterceptor _authenticate; |
|
|
|
final SecurityContext _securityContext; |
|
|
|
|
|
|
@ -103,12 +103,12 @@ class SimpleHttpClient { |
|
|
|
/// context, allowing you to set your self signed certificate as trusted. Please |
|
|
|
/// try to use [trustedCertificates] instead of [allowAnyCert] if possible. |
|
|
|
SimpleHttpClient( |
|
|
|
{this.userAgent: "simple_http_client", |
|
|
|
allowAnyCert: false, |
|
|
|
this.timeout: const Duration(seconds: 10), |
|
|
|
this.followRedirects: true, |
|
|
|
this.maxRedirects: 5, |
|
|
|
this.maxAuthRetries: 1, |
|
|
|
{this.userAgent = "simple_http_client", |
|
|
|
allowAnyCert = false, |
|
|
|
this.timeout = const Duration(seconds: 10), |
|
|
|
this.followRedirects = true, |
|
|
|
this.maxRedirects = 5, |
|
|
|
this.maxAuthRetries = 1, |
|
|
|
List<SimpleCertificate> trustedCertificates}) |
|
|
|
: _securityContext = |
|
|
|
(trustedCertificates != null) ? new SecurityContext() : null { |
|
|
|