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

Commit

Permalink
Merge pull request #275 from uservoice/bw-fix-body-params
Browse files Browse the repository at this point in the history
BUGFIX: skip null body params
  • Loading branch information
bzwheeler authored Oct 11, 2018
2 parents 957e125 + d5a9c73 commit 1b41232
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 1b41232

Please sign in to comment.