Skip to content
This repository has been archived by the owner on Jul 25, 2019. It is now read-only.

Commit

Permalink
BUGFIX: skip null body params
Browse files Browse the repository at this point in the history
  • Loading branch information
bzwheeler committed Oct 11, 2018
1 parent 957e125 commit d5a9c73
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,9 @@ private void addParamsToBody(Request.Builder builder) throws UnsupportedEncoding
if (params != null) {
FormBody.Builder paramsBuilder = new FormBody.Builder();
for (Map.Entry<String,String> param : params.entrySet()) {
paramsBuilder.add(param.getKey(), param.getValue());
if (param.getValue() != null) {
paramsBuilder.add(param.getKey(), param.getValue());
}
}
builder.method(method.toString(), paramsBuilder.build());
}
Expand Down

0 comments on commit d5a9c73

Please sign in to comment.