Allocate httpcontent (#8217)

This commit is contained in:
sunn 2020-12-19 08:13:49 +01:00 committed by GitHub
parent febd65d3b8
commit b127cc7b70
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -300,7 +300,7 @@ pplx::task<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}void{{/r
})
.then([=](std::vector<unsigned char> localVarResponse)
{
{{{returnType}}} localVarResult;
{{{returnType}}} localVarResult = std::make_shared<HttpContent>();
std::shared_ptr<std::stringstream> stream = std::make_shared<std::stringstream>(std::string(localVarResponse.begin(), localVarResponse.end()));
localVarResult->setData(stream);
return localVarResult;