From 4f34f61b701f537bc77bfcbc31cafe3e29b0c133 Mon Sep 17 00:00:00 2001 From: torkvalo Date: Wed, 10 Dec 2014 13:20:19 +0100 Subject: [PATCH 1/2] Delete fails in IE8/IE9, the verb needs to be capitalized. --- lib/adapters/xhr.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/adapters/xhr.js b/lib/adapters/xhr.js index f44bd45..2ad7e3e 100644 --- a/lib/adapters/xhr.js +++ b/lib/adapters/xhr.js @@ -27,7 +27,7 @@ module.exports = function xhrAdapter(resolve, reject, config) { // Create the request var request = new(XMLHttpRequest || ActiveXObject)('Microsoft.XMLHTTP'); - request.open(config.method, buildUrl(config.url, config.params), true); + request.open(config.method.toUpperCase(), buildUrl(config.url, config.params), true); // Listen for ready state request.onreadystatechange = function () { From ecd9f7391c938500b27b1464863e7da01f35b089 Mon Sep 17 00:00:00 2001 From: torkvalo Date: Wed, 10 Dec 2014 13:37:11 +0100 Subject: [PATCH 2/2] Fixes failing tests for the IE8/IE9 capitalized verb bug. --- test/specs/interceptors.spec.js | 2 +- test/specs/options.spec.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test/specs/interceptors.spec.js b/test/specs/interceptors.spec.js index 8c7db25..5cb0427 100644 --- a/test/specs/interceptors.spec.js +++ b/test/specs/interceptors.spec.js @@ -63,7 +63,7 @@ describe('interceptors', function () { responseText: 'OK' }); - expect(request.method).toBe('post'); + expect(request.method).toBe('POST'); expect(request.url).toBe('/bar'); }); }); diff --git a/test/specs/options.spec.js b/test/specs/options.spec.js index 4a9fb1f..34969a4 100644 --- a/test/specs/options.spec.js +++ b/test/specs/options.spec.js @@ -21,7 +21,7 @@ describe('options', function () { }, 'waiting for the request', 100); runs(function () { - expect(request.method).toBe('get'); + expect(request.method).toBe('GET'); }); });