Fork of SandBox's original mbed-http (https://os.mbed.com/teams/sandbox/code/mbed-http/) and update for MbedOS6+ Content of TESTS folder was replaced with basic examples form original SandBox's HelloWorld
Diff: README.md
- Revision:
- 29:383e9bfbfbed
- Parent:
- 25:47d5c90c9ceb
- Child:
- 30:3ad153a3fdfd
--- a/README.md Tue Mar 27 11:07:02 2018 +0200 +++ b/README.md Fri Aug 10 11:30:37 2018 +0100 @@ -59,7 +59,7 @@ By default the library will store the full request body on the heap. This works well for small responses, but you'll run out of memory when receiving a large response body. To mitigate this you can pass in a callback as the last argument to the request constructor. This callback will be called whenever a chunk of the body is received. You can set the request chunk size in the `HTTP_RECEIVE_BUFFER_SIZE` macro (see `mbed_lib.json` for the definition) although it also depends on the buffer size of the underlying network connection. ```cpp -void body_callback(const char* data, size_t data_len) { +void body_callback(const char* data, uint32_t data_len) { // do something with the data } @@ -72,7 +72,7 @@ If you cannot load the full request into memory, you can pass a callback into the `send` function. Through this callback you can feed in chunks of the request body. This is very useful if you want to send files from a file system. ```cpp -const void * get_chunk(size_t* out_size) { +const void * get_chunk(uint32_t* out_size) { // set the value of out_size (via *out_size = 10) to the size of the buffer // return the buffer