diff --git a/CHANGELOG.md b/CHANGELOG.md index 75facbd..96c27d8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,278 +3,164 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. -## [3.4.3](https://github.com/nativescript-community/https/compare/v3.4.2...v3.4.3) (2022-04-25) +## [3.4.4](https://github.com/nativescript-community/https/compare/v3.4.3...v3.4.4) (2022-04-25) + +### Bug Fixes +* **android:** dont try/catch sync methods to prevent missed errors ([cb830a8](https://github.com/nativescript-community/https/commit/cb830a8cad414133bcdff4a14c986cb8899984e6)) +* **android:** upgrade okhttp to max 3.x ([eb0b61e](https://github.com/nativescript-community/https/commit/eb0b61ea8ba53055538d5460abf0474a22ba3282)) + +## [3.4.3](https://github.com/nativescript-community/https/compare/v3.4.2...v3.4.3) (2022-04-25) ### Bug Fixes * **android:** native-api-usage fix ([bc3c7d2](https://github.com/nativescript-community/https/commit/bc3c7d24160038f48e487918ee8abcf5d24f0322)) - ### Features * contentLength ([a2e1017](https://github.com/nativescript-community/https/commit/a2e10170145a8e94e10f407e5fe772cb0d40e12c)) - - - - ## [3.4.2](https://github.com/nativescript-community/https/compare/v3.4.1...v3.4.2) (2022-02-26) - ### Bug Fixes * completely broken release … ([b35209e](https://github.com/nativescript-community/https/commit/b35209e98ebd87a196512a84b68b67c79ffb1341)) - - - - ## [3.4.1](https://github.com/nativescript-community/https/compare/v3.4.0...v3.4.1) (2022-02-26) - ### Bug Fixes * **android:** fixed broken build ([532ae49](https://github.com/nativescript-community/https/commit/532ae49a0dbe6c9dc4742400051d5ea86646ebbc)) - - - - # [3.4.0](https://github.com/nativescript-community/https/compare/v3.3.13...v3.4.0) (2022-02-25) - ### Features * refactoring to allow N alias to replace core impl ([22ac92f](https://github.com/nativescript-community/https/commit/22ac92f572c9b2739c40f5a39f47ac67d28a78ee)) - - - - ## [3.3.13](https://github.com/nativescript-community/https/compare/v3.3.12...v3.3.13) (2022-02-08) - ### Bug Fixes * **ios:** fix form data passed as a string ([d234842](https://github.com/nativescript-community/https/commit/d234842c5a29b8a360aae6c91dce80821630eea1)) - - - - ## [3.3.12](https://github.com/nativescript-community/https/compare/v3.3.11...v3.3.12) (2022-01-20) - ### Bug Fixes * **android:** progress support for uploading ([67817ac](https://github.com/nativescript-community/https/commit/67817ac284f8da424829b0c400b5c2c788ccf9dc)) - - - - ## [3.3.11](https://github.com/nativescript-community/https/compare/v3.3.10...v3.3.11) (2022-01-20) - ### Bug Fixes * **android:** native-api-usage fix ([06dc376](https://github.com/nativescript-community/https/commit/06dc376b01683675ef2a90135396ec5a9f1cf60a)) - - - - ## [3.3.10](https://github.com/nativescript-community/https/compare/v3.3.9...v3.3.10) (2022-01-19) - ### Bug Fixes * typings fix ([3490469](https://github.com/nativescript-community/https/commit/3490469cdc019265ec321ff9db37b94100f94b49)) - - - - ## [3.3.9](https://github.com/nativescript-community/https/compare/v3.3.8...v3.3.9) (2022-01-18) **Note:** Version bump only for package @nativescript-community/https - - - - ## [3.3.8](https://github.com/farfromrefug/nativescript-https/compare/v3.3.7...v3.3.8) (2022-01-18) - ### Bug Fixes * **android:** `cancelRequest` fix ([c7b8c93](https://github.com/farfromrefug/nativescript-https/commit/c7b8c935a6b02dc4f9e5c20c6911b2e59db8fa64)) - - - - ## [3.3.7](https://github.com/farfromrefug/nativescript-https/compare/v3.3.6...v3.3.7) (2022-01-15) - ### Bug Fixes * **android:** `cancelRequest` not exported ([9727802](https://github.com/farfromrefug/nativescript-https/commit/972780279a291d3f95636601450198a78d935696)) - - - - ## [3.3.6](https://github.com/farfromrefug/nativescript-https/compare/v3.3.5...v3.3.6) (2022-01-15) - ### Features * added method `cancelRequest`. You need to set the `tag` in request options first ([bace983](https://github.com/farfromrefug/nativescript-https/commit/bace9832d9ab07b158068eca3104a24f4c494851)) - - - - ## [3.3.5](https://github.com/farfromrefug/nativescript-https/compare/v3.3.4...v3.3.5) (2022-01-14) **Note:** Version bump only for package @nativescript-community/https - - - - ## [3.3.4](https://github.com/farfromrefug/nativescript-https/compare/v3.3.3...v3.3.4) (2022-01-14) - ### Bug Fixes * **android:** missing native-api-usage ([0d6d67b](https://github.com/farfromrefug/nativescript-https/commit/0d6d67b223e52d5e3d80b4513f2ee6d591495e4f)) * missing export of `addNetworkInterceptor`, `addInterceptor` ([2b503c4](https://github.com/farfromrefug/nativescript-https/commit/2b503c42d43cde3f82d994346948e20bbf91fc57)) - - - - ## [3.3.3](https://github.com/farfromrefug/nativescript-https/compare/v3.3.2...v3.3.3) (2021-12-23) - ### Bug Fixes * android allow interceptors ([49073c5](https://github.com/farfromrefug/nativescript-https/commit/49073c5c4e1ab1370da4260ebc833705eaabb2b3)) - - - - ## [3.3.2](https://github.com/farfromrefug/nativescript-https/compare/v3.3.1...v3.3.2) (2021-10-21) - ### Bug Fixes * **android:** native-api-usage fix ([6f8748d](https://github.com/farfromrefug/nativescript-https/commit/6f8748da0323eb2520dbb5024301deb136bd5baa)) - - - - ## [3.3.1](https://github.com/farfromrefug/nativescript-https/compare/v3.3.0...v3.3.1) (2021-10-18) - ### Bug Fixes * **android:** native-api-usage fix ([e18a203](https://github.com/farfromrefug/nativescript-https/commit/e18a2039464d488f3e370dd7feaf6ed61e4938e6)) - - - - # [3.3.0](https://github.com/farfromrefug/nativescript-https/compare/v3.2.2...v3.3.0) (2021-10-17) - ### Bug Fixes * **android:** Conscrypt not included by default anymore. You need to add it in your app ([c16f34d](https://github.com/farfromrefug/nativescript-https/commit/c16f34d1b2f3fa226760ab00b17e56f6996dff96)) - ### Features * **android:** native-api-usage ([9415f38](https://github.com/farfromrefug/nativescript-https/commit/9415f387b929b01c7fe385ff5d42e1bbd15ae2e4)) - - - - ## [3.2.2](https://github.com/farfromrefug/nativescript-https/compare/v3.2.1...v3.2.2) (2021-07-21) - ### Bug Fixes * **android:** prevent error when no cache-control ([e3d781e](https://github.com/farfromrefug/nativescript-https/commit/e3d781ed3a2d7364d3179d6a5acc39b5b9b65e29)) - - - - ## [3.2.1](https://github.com/farfromrefug/nativescript-https/compare/v3.2.0...v3.2.1) (2021-07-01) - ### Bug Fixes * **android:** support for application/x-www-form-urlencoded ([fb8db51](https://github.com/farfromrefug/nativescript-https/commit/fb8db514916dd1c29baa40016fc5302c64a79a41)) - - - - # [3.2.0](https://github.com/farfromrefug/nativescript-https/compare/v3.1.3...v3.2.0) (2021-03-14) - ### Features * **android:** forceCache option ([cc225be](https://github.com/farfromrefug/nativescript-https/commit/cc225bea37e0035288533106e48a469e11d15d01)) - - - - ## [3.1.3](https://github.com/farfromrefug/nativescript-https/compare/v3.1.2...v3.1.3) (2021-03-12) - ### Bug Fixes * **android:** correctly use timeout option ([9a1e5be](https://github.com/farfromrefug/nativescript-https/commit/9a1e5be39f70453653d8cbc38c66ddf6843754ce)) - - - - ## [3.1.2](https://github.com/farfromrefug/nativescript-https/compare/v3.1.1...v3.1.2) (2020-12-09) - ### Bug Fixes * ios crash with cache on < 13 ([e021b8d](https://github.com/farfromrefug/nativescript-https/commit/e021b8d9c847f5ba545cc6fc52e6271780dd4e7f)) - - - - ## [3.1.1](https://github.com/farfromrefug/nativescript-https/compare/v3.1.0...v3.1.1) (2020-11-26) - ### Bug Fixes * correctly handle null responses from requests ([6b70be6](https://github.com/farfromrefug/nativescript-https/commit/6b70be64eb44a7e3da1705f025128bd9fabe6d2a)) - - - - # 3.1.0 (2020-10-29) - ### Bug Fixes * ios throw error like android (useLegacy) ([ff86cdc](https://github.com/farfromrefug/nativescript-https/commit/ff86cdc7060e9f692ce515362327adbbbf424d15)) @@ -297,7 +183,6 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline * useLegacy should be a request option ([74f1afa](https://github.com/farfromrefug/nativescript-https/commit/74f1afabfeb051c08b89050b17771356381bd03c)) * **ios:** multipart fix ([0d9d331](https://github.com/farfromrefug/nativescript-https/commit/0d9d331ff49cedd06ed0d07cd25a4b50181a23a5)) - ### Features * basick cookie support ([91fe3c7](https://github.com/farfromrefug/nativescript-https/commit/91fe3c7d6b8fd7f4198845bd9f88324ccb384704)) @@ -306,22 +191,12 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline * move to @nativescript-community/https ([5c8d5c8](https://github.com/farfromrefug/nativescript-https/commit/5c8d5c8c4e5e7d50a0312cf978638b6068398025)) * multi formdata support ([c1dff6d](https://github.com/farfromrefug/nativescript-https/commit/c1dff6d27bcad54fb4f7aa03180a73696fc17ce2)) - - # 2.1.0 (2020-04-07) - - # 2.0.0 (2020-03-30) - - # 1.3.0 (2020-02-13) - - ## 1.2.2 (2019-10-16) - - # 1.2.0 (2019-10-06) diff --git a/lerna.json b/lerna.json index 4bc84e4..1d9f320 100644 --- a/lerna.json +++ b/lerna.json @@ -2,7 +2,7 @@ "packages": [ "plugin" ], - "version": "3.4.3", + "version": "3.4.4", "command": { "publish": { "conventionalCommits": true diff --git a/plugin/CHANGELOG.md b/plugin/CHANGELOG.md index 50b1e7b..22e9c85 100644 --- a/plugin/CHANGELOG.md +++ b/plugin/CHANGELOG.md @@ -3,242 +3,138 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. -## [3.4.3](https://github.com/nativescript-community/https/compare/v3.4.2...v3.4.3) (2022-04-25) - +## [3.4.4](https://github.com/nativescript-community/https/compare/v3.4.3...v3.4.4) (2022-04-25) ### Bug Fixes -* **android:** native-api-usage fix ([bc3c7d2](https://github.com/nativescript-community/https/commit/bc3c7d24160038f48e487918ee8abcf5d24f0322)) - +* **android:** upgrade okhttp to max 3.x ([eb0b61e](https://github.com/nativescript-community/https/commit/eb0b61ea8ba53055538d5460abf0474a22ba3282)) +## [3.4.3](https://github.com/nativescript-community/https/compare/v3.4.2...v3.4.3) (2022-04-25) +### Bug Fixes +* **android:** native-api-usage fix ([bc3c7d2](https://github.com/nativescript-community/https/commit/bc3c7d24160038f48e487918ee8abcf5d24f0322)) ## [3.4.2](https://github.com/nativescript-community/https/compare/v3.4.1...v3.4.2) (2022-02-26) **Note:** Version bump only for package @nativescript-community/https - - - - ## [3.4.1](https://github.com/nativescript-community/https/compare/v3.4.0...v3.4.1) (2022-02-26) **Note:** Version bump only for package @nativescript-community/https - - - - # [3.4.0](https://github.com/nativescript-community/https/compare/v3.3.13...v3.4.0) (2022-02-25) - ### Features * refactoring to allow N alias to replace core impl ([22ac92f](https://github.com/nativescript-community/https/commit/22ac92f572c9b2739c40f5a39f47ac67d28a78ee)) - - - - ## [3.3.13](https://github.com/nativescript-community/https/compare/v3.3.12...v3.3.13) (2022-02-08) **Note:** Version bump only for package @nativescript-community/https - - - - ## [3.3.12](https://github.com/nativescript-community/https/compare/v3.3.11...v3.3.12) (2022-01-20) - ### Bug Fixes * **android:** progress support for uploading ([67817ac](https://github.com/nativescript-community/https/commit/67817ac284f8da424829b0c400b5c2c788ccf9dc)) - - - - ## [3.3.11](https://github.com/nativescript-community/https/compare/v3.3.10...v3.3.11) (2022-01-20) - ### Bug Fixes * **android:** native-api-usage fix ([06dc376](https://github.com/nativescript-community/https/commit/06dc376b01683675ef2a90135396ec5a9f1cf60a)) - - - - ## [3.3.10](https://github.com/nativescript-community/https/compare/v3.3.9...v3.3.10) (2022-01-19) **Note:** Version bump only for package @nativescript-community/https - - - - ## [3.3.9](https://github.com/nativescript-community/https/compare/v3.3.8...v3.3.9) (2022-01-18) **Note:** Version bump only for package @nativescript-community/https - - - - ## [3.3.8](https://github.com/farfromrefug/nativescript-https/compare/v3.3.7...v3.3.8) (2022-01-18) **Note:** Version bump only for package @nativescript-community/https - - - - ## [3.3.7](https://github.com/farfromrefug/nativescript-https/compare/v3.3.6...v3.3.7) (2022-01-15) **Note:** Version bump only for package @nativescript-community/https - - - - ## [3.3.6](https://github.com/farfromrefug/nativescript-https/compare/v3.3.5...v3.3.6) (2022-01-15) **Note:** Version bump only for package @nativescript-community/https - - - - ## [3.3.5](https://github.com/farfromrefug/nativescript-https/compare/v3.3.4...v3.3.5) (2022-01-14) **Note:** Version bump only for package @nativescript-community/https - - - - ## [3.3.4](https://github.com/farfromrefug/nativescript-https/compare/v3.3.3...v3.3.4) (2022-01-14) - ### Bug Fixes * **android:** missing native-api-usage ([0d6d67b](https://github.com/farfromrefug/nativescript-https/commit/0d6d67b223e52d5e3d80b4513f2ee6d591495e4f)) - - - - ## [3.3.3](https://github.com/farfromrefug/nativescript-https/compare/v3.3.2...v3.3.3) (2021-12-23) **Note:** Version bump only for package @nativescript-community/https - - - - ## [3.3.2](https://github.com/farfromrefug/nativescript-https/compare/v3.3.1...v3.3.2) (2021-10-21) - ### Bug Fixes * **android:** native-api-usage fix ([6f8748d](https://github.com/farfromrefug/nativescript-https/commit/6f8748da0323eb2520dbb5024301deb136bd5baa)) - - - - ## [3.3.1](https://github.com/farfromrefug/nativescript-https/compare/v3.3.0...v3.3.1) (2021-10-18) - ### Bug Fixes * **android:** native-api-usage fix ([e18a203](https://github.com/farfromrefug/nativescript-https/commit/e18a2039464d488f3e370dd7feaf6ed61e4938e6)) - - - - # [3.3.0](https://github.com/farfromrefug/nativescript-https/compare/v3.2.2...v3.3.0) (2021-10-17) - ### Bug Fixes * **android:** Conscrypt not included by default anymore. You need to add it in your app ([c16f34d](https://github.com/farfromrefug/nativescript-https/commit/c16f34d1b2f3fa226760ab00b17e56f6996dff96)) - ### Features * **android:** native-api-usage ([9415f38](https://github.com/farfromrefug/nativescript-https/commit/9415f387b929b01c7fe385ff5d42e1bbd15ae2e4)) - - - - ## [3.2.2](https://github.com/farfromrefug/nativescript-https/compare/v3.2.1...v3.2.2) (2021-07-21) - ### Bug Fixes * **android:** prevent error when no cache-control ([e3d781e](https://github.com/farfromrefug/nativescript-https/commit/e3d781ed3a2d7364d3179d6a5acc39b5b9b65e29)) - - - - ## [3.2.1](https://github.com/farfromrefug/nativescript-https/compare/v3.2.0...v3.2.1) (2021-07-01) **Note:** Version bump only for package @nativescript-community/https - - - - # [3.2.0](https://github.com/farfromrefug/nativescript-https/compare/v3.1.3...v3.2.0) (2021-03-14) - ### Features * **android:** forceCache option ([cc225be](https://github.com/farfromrefug/nativescript-https/commit/cc225bea37e0035288533106e48a469e11d15d01)) - - - - ## [3.1.3](https://github.com/farfromrefug/nativescript-https/compare/v3.1.2...v3.1.3) (2021-03-12) **Note:** Version bump only for package @nativescript-community/https - - - - ## [3.1.2](https://github.com/farfromrefug/nativescript-https/compare/v3.1.1...v3.1.2) (2020-12-09) - ### Bug Fixes * ios crash with cache on < 13 ([e021b8d](https://github.com/farfromrefug/nativescript-https/commit/e021b8d9c847f5ba545cc6fc52e6271780dd4e7f)) - - - - ## [3.1.1](https://github.com/farfromrefug/nativescript-https/compare/v3.1.0...v3.1.1) (2020-11-26) - ### Bug Fixes * correctly handle null responses from requests ([6b70be6](https://github.com/farfromrefug/nativescript-https/commit/6b70be64eb44a7e3da1705f025128bd9fabe6d2a)) - - - - # 3.1.0 (2020-10-29) - ### Features * move to @nativescript-community/https ([5c8d5c8](https://github.com/farfromrefug/nativescript-https/commit/5c8d5c8c4e5e7d50a0312cf978638b6068398025)) diff --git a/plugin/package.json b/plugin/package.json index d63a35c..c5a8631 100644 --- a/plugin/package.json +++ b/plugin/package.json @@ -1,6 +1,6 @@ { "name": "@nativescript-community/https", - "version": "3.4.3", + "version": "3.4.4", "description": "Nativescript plugin for gestures", "main": "index", "sideEffects": false, diff --git a/plugin/platforms/android/include.gradle b/plugin/platforms/android/include.gradle index 6ab5dee..e3e9240 100644 --- a/plugin/platforms/android/include.gradle +++ b/plugin/platforms/android/include.gradle @@ -1,5 +1,5 @@ dependencies { - def okHttpVersion = project.hasProperty("okHttpVersion") ? project.okHttpVersion : "3.14.7" + def okHttpVersion = project.hasProperty("okHttpVersion") ? project.okHttpVersion : "3.14.9" implementation "com.squareup.okhttp3:okhttp:$okHttpVersion" // def conscryptVersion = project.hasProperty("conscryptVersion") ? project.conscryptVersion : "2.4.0" // implementation "org.conscrypt:conscrypt-android:$conscryptVersion" diff --git a/src/request.android.ts b/src/request.android.ts index e8b68a3..dbdeb41 100644 --- a/src/request.android.ts +++ b/src/request.android.ts @@ -105,13 +105,9 @@ class HttpsResponseLegacy implements IHttpsResponseLegacy { // cache it because asking it again wont work as the socket is closed stringResponse: string; toString() { - try { - // TODO: handle arraybuffer already stored - this.stringResponse = this.stringResponse || this.response.asString(); - return this.stringResponse; - } catch { - return null; - } + // TODO: handle arraybuffer already stored + this.stringResponse = this.stringResponse || this.response.asString(); + return this.stringResponse; } async toStringAsync(): Promise { if (this.stringResponse) { @@ -128,18 +124,13 @@ class HttpsResponseLegacy implements IHttpsResponseLegacy { // cache it because asking it again wont work as the socket is closed jsonResponse: any; toJSON(encoding?: HttpResponseEncoding) { - try { - if (this.jsonResponse !== undefined) { - return this.jsonResponse; - } - // TODO: handle arraybuffer already stored - this.stringResponse = this.stringResponse || this.response.asString(); - this.jsonResponse = this.stringResponse ? parseJSON(this.stringResponse) : null; + if (this.jsonResponse !== undefined) { return this.jsonResponse; - } catch (err) { - console.error('HttpsResponse.toJSON', err); - return null; } + // TODO: handle arraybuffer already stored + this.stringResponse = this.stringResponse || this.response.asString(); + this.jsonResponse = this.stringResponse ? parseJSON(this.stringResponse) : null; + return this.jsonResponse; } async toJSONAsync() {