Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Send data using delete #45

Merged
merged 2 commits into from
Apr 20, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
feat: Send data using delete
  • Loading branch information
xchunzhao committed Apr 17, 2019
commit d08636a360c7d196a215c68cb44535260250b44f
2 changes: 1 addition & 1 deletion src/defaultInterceptor.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export default (url, originOptions = {}) => {
// 默认get, 兼容method大小写
let method = options.method || "get";
method = method.toLowerCase();
if (method === "post" || method === "put" || method === "patch") {
if (method === "post" || method === "put" || method === "patch" || method === 'delete') {
// requestType 简写默认值为 json
const { requestType = "json", data } = options;
// 数据使用类axios的新字段data, 避免引用后影响旧代码, 如将body stringify多次
Expand Down