mirror of
https://github.com/tenrok/axios.git
synced 2026-05-30 15:24:11 +03:00
Merge pull request #30 from torarnek/master
Fixing errors caused by lowercase verb
This commit is contained in:
+1
-1
@@ -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 () {
|
||||
|
||||
@@ -63,7 +63,7 @@ describe('interceptors', function () {
|
||||
responseText: 'OK'
|
||||
});
|
||||
|
||||
expect(request.method).toBe('post');
|
||||
expect(request.method).toBe('POST');
|
||||
expect(request.url).toBe('/bar');
|
||||
});
|
||||
});
|
||||
|
||||
@@ -21,7 +21,7 @@ describe('options', function () {
|
||||
}, 'waiting for the request', 100);
|
||||
|
||||
runs(function () {
|
||||
expect(request.method).toBe('get');
|
||||
expect(request.method).toBe('GET');
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user