Skip to content

Commit

Permalink
解决post RequestParams无参数报405错误
Browse files Browse the repository at this point in the history
  • Loading branch information
彭建波 committed Apr 19, 2016
1 parent 08be5fa commit 640e709
Showing 1 changed file with 1 addition and 5 deletions.
Original file line number Diff line number Diff line change
@@ -340,16 +340,12 @@ protected RequestBody getRequestBody() {
}
} else {
FormBody.Builder builder = new FormBody.Builder();
boolean hasData = false;
for (Part part:params){
String key = part.getKey();
String value = part.getValue();
builder.add(key, value);
hasData = true;
}
if (hasData) {
body = builder.build();
}
body = builder.build();
}

return body;

0 comments on commit 640e709

Please sign in to comment.