forked from loafle/openapi-generator-original
update cpprest petstore samples
This commit is contained in:
parent
8698444fb2
commit
b1e7a4f724
@ -136,7 +136,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
|
||||
{
|
||||
@ -145,7 +148,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"));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user