HttpClient
HttpClient copied to clipboard
Transfer-Encoding: chunked
I think this library should add some codes to support Transfer-Encoding: chunked.
Or alternatively not state that it speaks HTTP/1.1 (which makes it mandatory to be able to cope with chunked encoding) but instead be honest and send out a HTTP/1.0
While processing additional headers may be more difficult checking content length from chunked encoding and removing the chunk length numbers would be slightly easier to include.
I came up against this talking to an api. Content from an api that set Transfer-Encoding: chunked would return:
f
{"nonce":11111}
0
in the serial monitor. f\r\n indicates the 15 character response, and 0\r\n indicates the end of the request.
This library should at least strip the chunk lengths trailing CRLF, and ideally the spurious CRLF after each chunk.