mirror of
https://github.com/tenrok/axios.git
synced 2026-06-02 16:04:10 +03:00
* Failing test for #1252 * Only delete header keys that match an HTTP verb if the value is a non-string Co-authored-by: David Ko <david.ko@pvtmethod.com> Co-authored-by: Jay <jasonsaayman@gmail.com>
This commit is contained in:
@@ -86,4 +86,17 @@ describe('headers', function () {
|
||||
done();
|
||||
});
|
||||
});
|
||||
|
||||
describe('when a header key matches an HTTP verb', function() {
|
||||
it('preserves the header value', function(done) {
|
||||
axios.post('/foo', null, { 'headers': { 'delete': 'test' } });
|
||||
|
||||
getAjaxRequest().then(function (request) {
|
||||
var headerValue = request.requestHeaders['delete'];
|
||||
|
||||
expect(headerValue).toEqual('test');
|
||||
done();
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user