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
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions dist/adapter/dsbridge.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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
Expand Up @@ -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 || {};

Expand Down Expand Up @@ -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);
}

Expand All @@ -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) {
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Up @@ -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);
/******/ })
/************************************************************************/
/******/ ({
Expand All @@ -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) {
Expand All @@ -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
Expand Up @@ -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);
/******/ })
/************************************************************************/
/******/ ({
Expand All @@ -99,7 +98,7 @@ module.exports = function handleImgBase64Data(responseData) {

/***/ }),

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

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

/******/ });
});
});