Fix for issue #4370 - Cpprest does not set Content-Type header on POST requests. (#4374)

* Fixed cpprest generator to include Content-Type header in requests.

* Fixing indent to use spaces.
This commit is contained in:
Scott Richter
2016-12-13 02:01:48 -05:00
committed by wing328
parent 15a84259aa
commit da9d64d053
32 changed files with 349 additions and 222 deletions

View File

@@ -180,7 +180,10 @@ pplx::task<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}void{{/r
else
{
throw ApiException(415, U("{{classname}}->{{operationId}} does not consume any supported media type"));
}
}
//Set the request content type in the header.
headerParams[U("Content-Type")] = requestHttpContentType;
{{#authMethods}}
// authentication ({{name}}) required