Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
) * 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>
- Loading branch information
1 parent
82fd15f
commit 76432c1
Showing
2 changed files
with
18 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
|
||
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' | ||
}); | ||
}); | ||
}); | ||
}) |