diff --git a/CHANGELOG.md b/CHANGELOG.md index cf1c70b..8de108d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,17 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [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) diff --git a/lerna.json b/lerna.json index 5ec116b..dacba6b 100644 --- a/lerna.json +++ b/lerna.json @@ -2,7 +2,7 @@ "packages": [ "plugin" ], - "version": "3.3.12", + "version": "3.3.13", "command": { "publish": { "conventionalCommits": true diff --git a/plugin/CHANGELOG.md b/plugin/CHANGELOG.md index 499a46b..890bb47 100644 --- a/plugin/CHANGELOG.md +++ b/plugin/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [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) diff --git a/plugin/package.json b/plugin/package.json index e8fa593..2cdfa9f 100644 --- a/plugin/package.json +++ b/plugin/package.json @@ -1,6 +1,6 @@ { "name": "@nativescript-community/https", - "version": "3.3.12", + "version": "3.3.13", "description": "Nativescript plugin for gestures", "main": "https", "sideEffects": false, diff --git a/src/https.ios.ts b/src/https.ios.ts index 7e1d236..6d059ff 100644 --- a/src/https.ios.ts +++ b/src/https.ios.ts @@ -425,8 +425,11 @@ export function createRequest(opts: Https.HttpsRequestOptions, useLegacy: boolea if (param.data instanceof NSURL) { formData.appendPartWithFileURLNameFileNameMimeTypeError(param.data, param.parameterName, param.fileName, param.contentType); } else { - // console.log('addding file data', param.data instanceof NSData); - formData.appendPartWithFileDataNameFileNameMimeType(param.data, param.parameterName, param.fileName, param.contentType); + let data = param.data; + if (typeof data === 'string') { + data = NSString.stringWithString(data).dataUsingEncoding(NSUTF8StringEncoding); + } + formData.appendPartWithFileDataNameFileNameMimeType(data, param.parameterName, param.fileName, param.contentType); } } else { formData.appendPartWithFormDataName(NSString.stringWithString(param.data).dataUsingEncoding(NSUTF8StringEncoding), param.parameterName);