Thank you for the link to TCP Stream API.
My comment was incorrect.
I did NOT find any specific HTTP Client examples in MotusToolbox.
My sentence should read, "In a quick look at HTTP and Client examples in ModusToolbox, I did NOT find any mention of "Chunk" related to HTTP."
I would like to see an HTTP Client example supporting "Chunked" transfers.
Are there any plans to support HTTP/1 Chunked transfers for any WiFi components in ModusToolbox?
1 of 1 people found this helpful
The broken link issue can be seen for other docs as well. The rule of thumb is that if you don't get a link, you can just put the keywords in the search field and it should give you the updated link.
Coming back to chunked transfer, mbed-http library does support chunked transfer encoding. You can use mbed http example as found in http-example - HTTP and HTTPS example application for Mbed OS 5 | Mbed and test as of now.
The MTB AnyCloud http client library is still under planning/development stage; so would refrain from commenting about that.
Here's a possible 'quick and dirty' solution that you can try in order to get the rest of the HTTP chunks...
Using the 'httpbin' (client) wiced demo for reference, inside:
event_handler -> case HTTP_DATA_RECEIVED -> if (response->request == &requests[x])....
call the following (with the paramaters modified to match your application):
wiced_tcp_stream_read(&requests[x].stream , buffer, 2048, 2000 ); // magic numbers are fun
if ( result == WICED_SUCCESS )
WPRINT_APP_INFO( ( "Server returned\n%s", buffer ) );
WPRINT_APP_INFO( ( "Get failed: %u\n", result ) );
It seems to have worked for me, even with TLS enabled.
Anyway, hope it helps. Good luck.