feat: add ponyfills to support multipart requests on android webview versions < 50 and iOS versions < 13.2

This commit is contained in:
Sefa Ilkimen
2019-11-18 02:01:02 +01:00
parent 3e5c941fdd
commit 7a09fa9460
12 changed files with 184 additions and 36 deletions
+4 -4
View File
@@ -799,12 +799,12 @@ const tests = [
}
},
{
disabled: true,
description: 'should serialize FormData instance correctly when it contains string value',
expected: 'resolved: {"status": 200, ...',
before: helpers.setMultipartSerializer,
func: function (resolve, reject) {
var formData = new FormData();
var ponyfills = cordova.plugin.http.ponyfills;
var formData = new ponyfills.FormData();
formData.append('myString', 'This is a test!');
var url = 'https://httpbin.org/anything';
@@ -818,13 +818,13 @@ const tests = [
}
},
{
disabled: true,
description: 'should serialize FormData instance correctly when it contains blob value',
expected: 'resolved: {"status": 200, ...',
before: helpers.setMultipartSerializer,
func: function (resolve, reject) {
var ponyfills = cordova.plugin.http.ponyfills;
helpers.getWithXhr(function(blob) {
var formData = new FormData();
var formData = new ponyfills.FormData();
formData.append('CordovaLogo', blob);
var url = 'https://httpbin.org/anything';