Skip to content

Commit

Permalink
fix send null for rest
Browse files Browse the repository at this point in the history
  • Loading branch information
genify committed Sep 18, 2018
1 parent a3ffccd commit 4aa9f07
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 5 additions & 1 deletion CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
0.5.1
--------------------------------------------------------
- BUG修复模块
* 修正 util/ajax/rest 无法发送 null 的问题

0.5.0 (2018-06-22)
--------------------------------------------------------
- BUG修复模块
Expand Down Expand Up @@ -60,7 +65,6 @@
- 功能变化
* bower 安装时忽略 test,doc,res,demo 目录


0.4.0 (2017-04-10)
--------------------------------------------------------
- 功能支持
Expand Down
4 changes: 3 additions & 1 deletion src/util/ajax/rest.js
Original file line number Diff line number Diff line change
Expand Up @@ -201,8 +201,10 @@ NEJ.define([
f:_options.onerror||_f
};
// add params to url with GET/HEAD/DELETE method
// fix rest can't send null bug
_options.method = _options.method||'GET';
if (_reg1.test(_options.method.trim())){
if (_reg1.test(_options.method.trim())||
_options.data==null){
_u._$forIn(_data,_doCheckData);
_options.query = _data;
_data = null;
Expand Down

0 comments on commit 4aa9f07

Please sign in to comment.