mirror of
https://github.com/tenrok/axios.git
synced 2026-05-15 11:59:42 +03:00
fix(headers): added support for setting header names that overlap with class methods; (#5831)
This commit is contained in:
@@ -76,6 +76,17 @@ describe('AxiosHeaders', function () {
|
||||
})
|
||||
});
|
||||
|
||||
it('should support uppercase name mapping for names overlapped by class methods', () => {
|
||||
const headers = new AxiosHeaders({
|
||||
set: 'foo'
|
||||
});
|
||||
|
||||
headers.set('get', 'bar');
|
||||
|
||||
assert.strictEqual(headers.get('Set'), 'foo');
|
||||
assert.strictEqual(headers.get('Get'), 'bar');
|
||||
});
|
||||
|
||||
describe('get', function () {
|
||||
describe('filter', function() {
|
||||
it('should support RegExp', function () {
|
||||
|
||||
Reference in New Issue
Block a user