2
0
mirror of https://github.com/tenrok/axios.git synced 2026-06-05 16:42:32 +03:00

fix axios.delete ignores config.data (#3282)

Co-authored-by: Jay <jasonsaayman@gmail.com>
This commit is contained in:
Xianming Zhong
2020-10-01 15:46:32 +08:00
committed by GitHub
parent b7e954eba3
commit fa3673710e
2 changed files with 13 additions and 1 deletions
+11
View File
@@ -43,6 +43,17 @@ describe('requests', function () {
});
});
it('should allow data', function (done) {
axios.delete('/foo', {
data: { foo: 'bar' }
});
getAjaxRequest().then(function (request) {
expect(request.params).toBe(JSON.stringify({ foo: 'bar' }));
done();
});
});
it('should make an http request', function (done) {
axios('/foo');