mirror of
https://github.com/silkimen/cordova-plugin-advanced-http.git
synced 2026-04-24 00:00:03 +08:00
feat: add ponyfills to support multipart requests on android webview versions < 50 and iOS versions < 13.2
This commit is contained in:
+4
-4
@@ -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';
|
||||
|
||||
Reference in New Issue
Block a user