Compare commits

...
3 Commits
Author SHA1 Message Date
Sefa Ilkimen 2263950de9 release v1.11.1 2018-03-21 13:18:57 +01:00
Sefa Ilkimen 2a9d3296cc update httpbin.org SSL cert 2018-03-21 12:56:11 +01:00
Sefa Ilkimen 55dd751cec fix #92: headers not deserialized on platform "browser" 2018-03-16 03:04:03 +01:00
5 changed files with 23 additions and 4 deletions
+4
View File
@@ -1,5 +1,9 @@
# Changelog
## 1.11.1
- Fixed #92: headers not deserialized on platform "browser"
## 1.11.0
- Feature #77: allow overriding global settings for each single request
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "cordova-plugin-advanced-http",
"version": "1.11.0",
"version": "1.11.1",
"description": "Cordova / Phonegap plugin for communicating with HTTP servers using SSL pinning",
"scripts": {
"buildbrowser": "./scripts/build-test-app.sh --browser",
+1 -1
View File
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<plugin xmlns="http://www.phonegap.com/ns/plugins/1.0" xmlns:android="http://schemas.android.com/apk/res/android" id="cordova-plugin-advanced-http" version="1.11.0">
<plugin xmlns="http://www.phonegap.com/ns/plugins/1.0" xmlns:android="http://schemas.android.com/apk/res/android" id="cordova-plugin-advanced-http" version="1.11.1">
<name>Advanced HTTP plugin</name>
<description>
Cordova / Phonegap plugin for communicating with HTTP servers using SSL pinning
+17 -2
View File
@@ -37,12 +37,27 @@ function serializeParams(params) {
}).join('&');
}
function deserializeResponseHeaders(headers) {
var headerMap = {};
var arr = headers.trim().split(/[\r\n]+/);
arr.forEach(function (line) {
var parts = line.split(': ');
var header = parts.shift().toLowerCase();
var value = parts.join(': ');
headerMap[header] = value;
});
return headerMap;
}
function createXhrSuccessObject(xhr) {
return {
url: xhr.responseURL,
status: xhr.status,
data: helpers.getTypeOf(xhr.responseText) === 'String' ? xhr.responseText : xhr.response,
headers: xhr.getAllResponseHeaders()
headers: deserializeResponseHeaders(xhr.getAllResponseHeaders())
};
}
@@ -136,7 +151,7 @@ var browserInterface = {
put: function (success, failure, opts) {
return sendRequest('put', true, opts, success, failure);
},
patch: function (success, failure, opts) {
patch: function (success, failure, opts) {
return sendRequest('patch', true, opts, success, failure);
},
delete: function (success, failure, opts) {
Binary file not shown.