Quantcast
Channel: WE MOVED to github.com/microsoft/cpprestsdk. This site is not monitored!
Viewing all articles
Browse latest Browse all 4845

New Post: Assert with request in http_client_impl.h on iOS

$
0
0
This is solved. I found out my issue-- I was setting the Content-Length for a POST but not setting the body for the request. For reference here are the updated lines:
    if (HTTPBody.length() > 0)
    {
        std::string val;
        formatString(val, "%zd",HTTPBody.length());
        req.headers().add(header_names::content_length,val);
        if (contentType.length() > 0)
            req.set_body(HTTPBody,contentType);
        else
            req.set_body(HTTPBody);
    }

Viewing all articles
Browse latest Browse all 4845

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>