Browse Source

small updates

master
Miguel Castiblanco 2 years ago
parent
commit
fcf7bb4d21
  1. 16
      lib/simple_http_client.dart
  2. 2
      pubspec.yaml

16
lib/simple_http_client.dart

@ -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 {

2
pubspec.yaml

@ -1,6 +1,6 @@
name: simple_http_client
version: 0.9.9
description: Simple HTTP client for Flutter and Dart server
description: Simple HTTP client for Flutter and Dart server. Supports authenticator, and request/response interceptors.
author: Miguel Castiblanco <miguel@starcarr.co>
homepage: https://git.starcarr.co/Dart/SimpleWebClient

Loading…
Cancel
Save