2
0
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:
Dmitriy Mozgovoy
2023-08-25 21:07:51 +03:00
committed by GitHub
parent 3f53eb6960
commit d8b4ca0ea5
4 changed files with 26 additions and 3 deletions
+11
View File
@@ -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 () {