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

New Post: Difficulty retreiving JSON data

$
0
0
Paul and I talked offline and he shared with me the response headers he was getting and I figured out what the issue is.

From your server there is no Content-Length header or Transfer-Encoding header, without out those our implementation doesn’t know how long the message body is. So when you call extract_string() the data is empty and when you call extract_json an empty string isn’t valid json so a parsing exception is thrown. This is a bug on our side according to the HTTP specification in section 4.4 Message Length the last option if no Content-Length or Transfer-Encoding is specified is by figured out the length when the server closes the connection. We will fix this bug for our next release 1.5, probably around the end of January.

Thanks Paul for taking the time to report the issue.

Steve

Viewing all articles
Browse latest Browse all 4845

Trending Articles