mirror of
https://github.com/tenrok/axios.git
synced 2026-06-11 18:02:32 +03:00
fix(headers): allow iterable objects to be a data source for the set method; (#6873)
This commit is contained in:
@@ -73,7 +73,15 @@ describe('AxiosHeaders', function () {
|
||||
headers.set('foo', 'value2', true);
|
||||
|
||||
assert.strictEqual(headers.get('foo'), 'value2');
|
||||
})
|
||||
});
|
||||
|
||||
it('should support iterables as a key-value source object', function () {
|
||||
const headers = new AxiosHeaders();
|
||||
|
||||
headers.set(new Map([['x', '123']]));
|
||||
|
||||
assert.strictEqual(headers.get('x'), '123');
|
||||
});
|
||||
});
|
||||
|
||||
it('should support uppercase name mapping for names overlapped by class methods', () => {
|
||||
|
||||
Reference in New Issue
Block a user