mirror of
https://github.com/axios/axios.git
synced 2026-04-12 14:41:55 +08:00
* Fixed posting FormData in browser environment by reverting #3785; * Added ability to keep `Content-Type` header in non-standard browser environments; * Added browser test of FormData posting using external HTTP service (https://httpbin.org/post); Co-authored-by: Jay <jasonsaayman@gmail.com>
15 lines
295 B
JavaScript
15 lines
295 B
JavaScript
|
|
describe('FormData', function() {
|
|
it('should allow FormData posting', function () {
|
|
return axios.postForm('http://httpbin.org/post', {
|
|
a: 'foo',
|
|
b: 'bar'
|
|
}).then(({data}) => {
|
|
expect(data.form).toEqual({
|
|
a: 'foo',
|
|
b: 'bar'
|
|
});
|
|
});
|
|
});
|
|
})
|