Skip to content

Commit

Permalink
Propsed fix for the ApiClient runtime crash (#6523)
Browse files Browse the repository at this point in the history
  • Loading branch information
WendellDuncan authored and wing328 committed Sep 23, 2017
1 parent c5c639b commit 8698444
Showing 1 changed file with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,10 @@ pplx::task<web::http::http_response> ApiClient::callApi(
{
body_data[kvp.first] = ModelBase::toJson(kvp.second);
}
request.set_body(body_data);
if (!formParams.empty())
{
request.set_body(body_data);
}
}
else
{
Expand All @@ -133,7 +136,10 @@ pplx::task<web::http::http_response> ApiClient::callApi(
{
formData.append_query(kvp.first, kvp.second);
}
request.set_body(formData.query(), U("application/x-www-form-urlencoded"));
if (!formParams.empty())
{
request.set_body(formData.query(), U("application/x-www-form-urlencoded"));
}
}
}
}
Expand Down

0 comments on commit 8698444

Please sign in to comment.