Skip to content

Commit

Permalink
[C++][Restbed] Fix for restbed 4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
muttleyxd committed May 16, 2019
1 parent b3d3c09 commit 0ceeaea
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,8 @@ void {{classname}}{{vendorExtensions.x-codegen-resourceName}}Resource::{{httpMet
const auto request = session->get_request();
{{#hasBodyParam}}
// Body params are present, therefore we have to fetch them
int content_length = request->get_header("Content-Length", 0);
int content_length;
request->get_header("Content-Length", content_length, 0);
session->fetch(content_length,
[ this ]( const std::shared_ptr<restbed::Session> session, const restbed::Bytes & body )
{
Expand Down Expand Up @@ -147,7 +148,8 @@ void {{classname}}{{vendorExtensions.x-codegen-resourceName}}Resource::{{httpMet
const auto request = session->get_request();
{{#hasBodyParam}}
// Body params are present, therefore we have to fetch them
int content_length = request->get_header("Content-Length", 0);
int content_length;
request->get_header("Content-Length", content_length, 0);
session->fetch(content_length,
[ this ]( const std::shared_ptr<restbed::Session> session, const restbed::Bytes & body )
{
Expand Down

0 comments on commit 0ceeaea

Please sign in to comment.