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

hotfix: Remove DELETE method in filter list. #243

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
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
hotfix: Remove DELETE method in filter list.
lanzhiheng committed Nov 1, 2019
commit 1ff127a36c3756b20db27bf7bdf3229eb51d97ee
4 changes: 2 additions & 2 deletions dist/adapter/dsbridge.js
Original file line number Diff line number Diff line change
@@ -94,7 +94,7 @@ function KEEP(_,cb){cb();}
"use strict";

var handleImgBase64Data = __webpack_require__(0);
var adapter = void 0;
var adapter = void 0;
if (window.dsBridge) {
adapter = function adapter(request, responseCallBack) {
dsBridge.call("onAjaxRequest", request, function (responseData) {
@@ -116,4 +116,4 @@ KEEP("cdn||cdn-min", function () {
module.exports = adapter;

/***/ })
/******/ ]);
/******/ ]);
22 changes: 11 additions & 11 deletions dist/fly.js
Original file line number Diff line number Diff line change
@@ -311,7 +311,7 @@ var Fly = function () {
}

var responseType = utils.trim(options.responseType || "");
var needQuery = ["GET", "HEAD", "DELETE", "OPTION"].indexOf(options.method) !== -1;
var needQuery = ["GET", "HEAD", "OPTION"].indexOf(options.method) !== -1;
var dataType = utils.type(data);
var params = options.params || {};

@@ -415,9 +415,9 @@ var Fly = function () {
// The xhr of IE9 has not response field
var response = engine.response || engine.responseText;
if (response && options.parseJson && (engine.getResponseHeader(contentType) || "").indexOf("json") !== -1
// Some third engine implementation may transform the response text to json object automatically,
// so we should test the type of response before transforming it
&& !utils.isObject(response)) {
// Some third engine implementation may transform the response text to json object automatically,
// so we should test the type of response before transforming it
&& !utils.isObject(response)) {
response = JSON.parse(response);
}

@@ -435,7 +435,7 @@ var Fly = function () {
}
var status = engine.status;
var statusText = engine.statusText;
var _data = {data: response, headers: headers, status: status, statusText: statusText};
var _data = { data: response, headers: headers, status: status, statusText: statusText };
// The _response filed of engine is set in adapter which be called in engine-wrapper.js
utils.merge(_data, engine._response);
if (status >= 200 && status < 300 || status === 304) {
@@ -523,11 +523,11 @@ Fly.default = Fly;
return this.request(url, data, utils.merge({ method: e }, option));
};
});
["lock", "unlock", "clear"].forEach(function (e) {
Fly.prototype[e] = function () {
this.interceptors.request[e]();
};
});
["lock", "unlock", "clear"].forEach(function (e) {
Fly.prototype[e] = function () {
this.interceptors.request[e]();
};
});
// Learn more about keep-loader: https://github.com/wendux/keep-loader
KEEP("cdn||cdn-min", function () {
// This code block will be removed besides the "CDN" and "cdn-min" build environment
@@ -538,4 +538,4 @@ module.exports = Fly;

/***/ })

/******/ });
/******/ });
2 changes: 1 addition & 1 deletion dist/fly.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 4 additions & 5 deletions dist/npm/adapter/dsbridge.js
Original file line number Diff line number Diff line change
@@ -73,8 +73,7 @@ return /******/ (function(modules) { // webpackBootstrap
/******/ __webpack_require__.p = "";
/******/
/******/ // Load entry module and return exports
/******/
return __webpack_require__(__webpack_require__.s = 8);
/******/ return __webpack_require__(__webpack_require__.s = 8);
/******/ })
/************************************************************************/
/******/ ({
@@ -99,14 +98,14 @@ module.exports = function handleImgBase64Data(responseData) {

/***/ }),

/***/ 8:
/***/ 8:
/***/ (function(module, exports, __webpack_require__) {

function KEEP(_,cb){cb();}
"use strict";

var handleImgBase64Data = __webpack_require__(3);
var adapter = void 0;
var adapter = void 0;
if (window.dsBridge) {
adapter = function adapter(request, responseCallBack) {
dsBridge.call("onAjaxRequest", request, function (responseData) {
@@ -128,4 +127,4 @@ module.exports = adapter;
/***/ })

/******/ });
});
});
7 changes: 3 additions & 4 deletions dist/npm/adapter/webviewjsbridge.js
Original file line number Diff line number Diff line change
@@ -73,8 +73,7 @@ return /******/ (function(modules) { // webpackBootstrap
/******/ __webpack_require__.p = "";
/******/
/******/ // Load entry module and return exports
/******/
return __webpack_require__(__webpack_require__.s = 9);
/******/ return __webpack_require__(__webpack_require__.s = 9);
/******/ })
/************************************************************************/
/******/ ({
@@ -99,7 +98,7 @@ module.exports = function handleImgBase64Data(responseData) {

/***/ }),

/***/ 9:
/***/ 9:
/***/ (function(module, exports, __webpack_require__) {

function KEEP(_,cb){cb();}
@@ -144,4 +143,4 @@ module.exports = adapter;
/***/ })

/******/ });
});
});
1,550 changes: 723 additions & 827 deletions dist/npm/ap.js

Large diffs are not rendered by default.

22 changes: 11 additions & 11 deletions dist/npm/fly.js
Original file line number Diff line number Diff line change
@@ -320,7 +320,7 @@ var Fly = function () {
}

var responseType = utils.trim(options.responseType || "");
var needQuery = ["GET", "HEAD", "DELETE", "OPTION"].indexOf(options.method) !== -1;
var needQuery = ["GET", "HEAD", "OPTION"].indexOf(options.method) !== -1;
var dataType = utils.type(data);
var params = options.params || {};

@@ -424,9 +424,9 @@ var Fly = function () {
// The xhr of IE9 has not response field
var response = engine.response || engine.responseText;
if (response && options.parseJson && (engine.getResponseHeader(contentType) || "").indexOf("json") !== -1
// Some third engine implementation may transform the response text to json object automatically,
// so we should test the type of response before transforming it
&& !utils.isObject(response)) {
// Some third engine implementation may transform the response text to json object automatically,
// so we should test the type of response before transforming it
&& !utils.isObject(response)) {
response = JSON.parse(response);
}

@@ -444,7 +444,7 @@ var Fly = function () {
}
var status = engine.status;
var statusText = engine.statusText;
var _data = {data: response, headers: headers, status: status, statusText: statusText};
var _data = { data: response, headers: headers, status: status, statusText: statusText };
// The _response filed of engine is set in adapter which be called in engine-wrapper.js
utils.merge(_data, engine._response);
if (status >= 200 && status < 300 || status === 304) {
@@ -532,15 +532,15 @@ Fly.default = Fly;
return this.request(url, data, utils.merge({ method: e }, option));
};
});
["lock", "unlock", "clear"].forEach(function (e) {
Fly.prototype[e] = function () {
this.interceptors.request[e]();
};
});
["lock", "unlock", "clear"].forEach(function (e) {
Fly.prototype[e] = function () {
this.interceptors.request[e]();
};
});
// Learn more about keep-loader: https://github.com/wendux/keep-loader
;
module.exports = Fly;

/***/ })
/******/ ]);
});
});
37 changes: 18 additions & 19 deletions dist/npm/hap.js
Original file line number Diff line number Diff line change
@@ -73,8 +73,7 @@ return /******/ (function(modules) { // webpackBootstrap
/******/ __webpack_require__.p = "";
/******/
/******/ // Load entry module and return exports
/******/
return __webpack_require__(__webpack_require__.s = 11);
/******/ return __webpack_require__(__webpack_require__.s = 11);
/******/ })
/************************************************************************/
/******/ ([
@@ -519,7 +518,7 @@ var Fly = function () {
}

var responseType = utils.trim(options.responseType || "");
var needQuery = ["GET", "HEAD", "DELETE", "OPTION"].indexOf(options.method) !== -1;
var needQuery = ["GET", "HEAD", "OPTION"].indexOf(options.method) !== -1;
var dataType = utils.type(data);
var params = options.params || {};

@@ -623,9 +622,9 @@ var Fly = function () {
// The xhr of IE9 has not response field
var response = engine.response || engine.responseText;
if (response && options.parseJson && (engine.getResponseHeader(contentType) || "").indexOf("json") !== -1
// Some third engine implementation may transform the response text to json object automatically,
// so we should test the type of response before transforming it
&& !utils.isObject(response)) {
// Some third engine implementation may transform the response text to json object automatically,
// so we should test the type of response before transforming it
&& !utils.isObject(response)) {
response = JSON.parse(response);
}

@@ -643,7 +642,7 @@ var Fly = function () {
}
var status = engine.status;
var statusText = engine.statusText;
var _data = {data: response, headers: headers, status: status, statusText: statusText};
var _data = { data: response, headers: headers, status: status, statusText: statusText };
// The _response filed of engine is set in adapter which be called in engine-wrapper.js
utils.merge(_data, engine._response);
if (status >= 200 && status < 300 || status === 304) {
@@ -731,19 +730,19 @@ Fly.default = Fly;
return this.request(url, data, utils.merge({ method: e }, option));
};
});
["lock", "unlock", "clear"].forEach(function (e) {
Fly.prototype[e] = function () {
this.interceptors.request[e]();
};
});
["lock", "unlock", "clear"].forEach(function (e) {
Fly.prototype[e] = function () {
this.interceptors.request[e]();
};
});
// Learn more about keep-loader: https://github.com/wendux/keep-loader
;
module.exports = Fly;

/***/ }),
/* 3 */,
/* 4 */,
/* 5 */
/* 4 */,
/* 5 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
@@ -778,9 +777,9 @@ module.exports = function (fetch) {
/* 6 */,
/* 7 */,
/* 8 */,
/* 9 */,
/* 10 */,
/* 11 */
/* 9 */,
/* 10 */,
/* 11 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
@@ -789,12 +788,12 @@ module.exports = function (fetch) {
//quick app entry
var Fly = __webpack_require__(2);
var EngineWrapper = __webpack_require__(1);
var adapter = __webpack_require__(5);
var adapter = __webpack_require__(5);
module.exports = function (fetch) {
var hapEngine = EngineWrapper(adapter(fetch));
return new Fly(hapEngine);
};

/***/ })
/******/ ]);
});
});
37 changes: 18 additions & 19 deletions dist/npm/weex.js
Original file line number Diff line number Diff line change
@@ -73,8 +73,7 @@ return /******/ (function(modules) { // webpackBootstrap
/******/ __webpack_require__.p = "";
/******/
/******/ // Load entry module and return exports
/******/
return __webpack_require__(__webpack_require__.s = 12);
/******/ return __webpack_require__(__webpack_require__.s = 12);
/******/ })
/************************************************************************/
/******/ ([
@@ -519,7 +518,7 @@ var Fly = function () {
}

var responseType = utils.trim(options.responseType || "");
var needQuery = ["GET", "HEAD", "DELETE", "OPTION"].indexOf(options.method) !== -1;
var needQuery = ["GET", "HEAD", "OPTION"].indexOf(options.method) !== -1;
var dataType = utils.type(data);
var params = options.params || {};

@@ -623,9 +622,9 @@ var Fly = function () {
// The xhr of IE9 has not response field
var response = engine.response || engine.responseText;
if (response && options.parseJson && (engine.getResponseHeader(contentType) || "").indexOf("json") !== -1
// Some third engine implementation may transform the response text to json object automatically,
// so we should test the type of response before transforming it
&& !utils.isObject(response)) {
// Some third engine implementation may transform the response text to json object automatically,
// so we should test the type of response before transforming it
&& !utils.isObject(response)) {
response = JSON.parse(response);
}

@@ -643,7 +642,7 @@ var Fly = function () {
}
var status = engine.status;
var statusText = engine.statusText;
var _data = {data: response, headers: headers, status: status, statusText: statusText};
var _data = { data: response, headers: headers, status: status, statusText: statusText };
// The _response filed of engine is set in adapter which be called in engine-wrapper.js
utils.merge(_data, engine._response);
if (status >= 200 && status < 300 || status === 304) {
@@ -731,20 +730,20 @@ Fly.default = Fly;
return this.request(url, data, utils.merge({ method: e }, option));
};
});
["lock", "unlock", "clear"].forEach(function (e) {
Fly.prototype[e] = function () {
this.interceptors.request[e]();
};
});
["lock", "unlock", "clear"].forEach(function (e) {
Fly.prototype[e] = function () {
this.interceptors.request[e]();
};
});
// Learn more about keep-loader: https://github.com/wendux/keep-loader
;
module.exports = Fly;

/***/ }),
/* 3 */,
/* 4 */,
/* 5 */,
/* 6 */
/* 5 */,
/* 6 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
@@ -777,9 +776,9 @@ module.exports = function (request, responseCallback) {
/* 7 */,
/* 8 */,
/* 9 */,
/* 10 */,
/* 11 */,
/* 12 */
/* 10 */,
/* 11 */,
/* 12 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
@@ -788,12 +787,12 @@ module.exports = function (request, responseCallback) {
//weex entry
var Fly = __webpack_require__(2);
var EngineWrapper = __webpack_require__(1);
var adapter = __webpack_require__(6);
var adapter = __webpack_require__(6);
var weexEngine = EngineWrapper(adapter);
module.exports = function (engine) {
return new Fly(engine || weexEngine);
};

/***/ })
/******/ ]);
});
});
39 changes: 19 additions & 20 deletions dist/npm/wx.js
Original file line number Diff line number Diff line change
@@ -73,8 +73,7 @@ return /******/ (function(modules) { // webpackBootstrap
/******/ __webpack_require__.p = "";
/******/
/******/ // Load entry module and return exports
/******/
return __webpack_require__(__webpack_require__.s = 13);
/******/ return __webpack_require__(__webpack_require__.s = 13);
/******/ })
/************************************************************************/
/******/ ([
@@ -519,7 +518,7 @@ var Fly = function () {
}

var responseType = utils.trim(options.responseType || "");
var needQuery = ["GET", "HEAD", "DELETE", "OPTION"].indexOf(options.method) !== -1;
var needQuery = ["GET", "HEAD", "OPTION"].indexOf(options.method) !== -1;
var dataType = utils.type(data);
var params = options.params || {};

@@ -623,9 +622,9 @@ var Fly = function () {
// The xhr of IE9 has not response field
var response = engine.response || engine.responseText;
if (response && options.parseJson && (engine.getResponseHeader(contentType) || "").indexOf("json") !== -1
// Some third engine implementation may transform the response text to json object automatically,
// so we should test the type of response before transforming it
&& !utils.isObject(response)) {
// Some third engine implementation may transform the response text to json object automatically,
// so we should test the type of response before transforming it
&& !utils.isObject(response)) {
response = JSON.parse(response);
}

@@ -643,7 +642,7 @@ var Fly = function () {
}
var status = engine.status;
var statusText = engine.statusText;
var _data = {data: response, headers: headers, status: status, statusText: statusText};
var _data = { data: response, headers: headers, status: status, statusText: statusText };
// The _response filed of engine is set in adapter which be called in engine-wrapper.js
utils.merge(_data, engine._response);
if (status >= 200 && status < 300 || status === 304) {
@@ -731,11 +730,11 @@ Fly.default = Fly;
return this.request(url, data, utils.merge({ method: e }, option));
};
});
["lock", "unlock", "clear"].forEach(function (e) {
Fly.prototype[e] = function () {
this.interceptors.request[e]();
};
});
["lock", "unlock", "clear"].forEach(function (e) {
Fly.prototype[e] = function () {
this.interceptors.request[e]();
};
});
// Learn more about keep-loader: https://github.com/wendux/keep-loader
;
module.exports = Fly;
@@ -744,8 +743,8 @@ module.exports = Fly;
/* 3 */,
/* 4 */,
/* 5 */,
/* 6 */,
/* 7 */
/* 6 */,
/* 7 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
@@ -782,23 +781,23 @@ module.exports = function (request, responseCallback) {
/* 8 */,
/* 9 */,
/* 10 */,
/* 11 */,
/* 12 */,
/* 13 */
/* 11 */,
/* 12 */,
/* 13 */
/***/ (function(module, exports, __webpack_require__) {

"use strict";


//微信小程序入口
var _Fly = __webpack_require__(2);
var _Fly = __webpack_require__(2);
var EngineWrapper = __webpack_require__(1);
var adapter = __webpack_require__(7);
var adapter = __webpack_require__(7);
var wxEngine = EngineWrapper(adapter);
module.exports = function (engine) {
return new _Fly(engine || wxEngine);
};

/***/ })
/******/ ]);
});
});
2 changes: 1 addition & 1 deletion dist/umd/ap.umd.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/umd/fly.umd.min.js
2 changes: 1 addition & 1 deletion dist/umd/hap.umd.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/umd/weex.umd.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/umd/wx.umd.min.js

Large diffs are not rendered by default.

713 changes: 321 additions & 392 deletions miniprogram_dist/engine-wrapper.js

Large diffs are not rendered by default.

1,540 changes: 718 additions & 822 deletions miniprogram_dist/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/fly.js
Original file line number Diff line number Diff line change
@@ -145,7 +145,7 @@ class Fly {
}

let responseType = utils.trim(options.responseType || "")
let needQuery = ["GET", "HEAD", "DELETE", "OPTION"].indexOf(options.method) !== -1;
let needQuery = ["GET", "HEAD", "OPTION"].indexOf(options.method) !== -1;
let dataType = utils.type(data);
let params = options.params || {};