diff --git a/CHANGELOG.md b/CHANGELOG.md index 96913da..9b407b4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -33,3 +33,7 @@ Fiz iOS parallels requests. ## 2.0.2 Fix error Platform import + +## 2.0.3 + +Error on pass null to headers \ No newline at end of file diff --git a/README.md b/README.md index a61cee9..1c719e0 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ In your flutter or dart project add the dependency: ```yml dependencies: ... - http_certificate_pinning: 2.0.2 + http_certificate_pinning: 2.0.3 ``` ## Get Certificate FingerPrint diff --git a/lib/src/http_certificate_pinning.dart b/lib/src/http_certificate_pinning.dart index db3db83..ae5a98c 100644 --- a/lib/src/http_certificate_pinning.dart +++ b/lib/src/http_certificate_pinning.dart @@ -26,7 +26,7 @@ class HttpCertificatePinning { }) async { final Map params = { "url": serverURL, - "headers": headerHttp, + "headers": headerHttp ?? {}, "type": sha.toString().split(".").last, "fingerprints": allowedSHAFingerprints.map((a) => a.replaceAll(":", "")).toList(), diff --git a/pubspec.yaml b/pubspec.yaml index 830a949..895c280 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: http_certificate_pinning description: Https Certificate pinning for Flutter -version: 2.0.2 +version: 2.0.3 author: Diefferson Santos homepage: https://github.com/diefferson/http_certificate_pinning