This library is used to make HTTP and HTTPS calls from mbed OS 5 applications.
Fork of mbed-http by
Diff: source/http_response_parser.h
- Revision:
- 3:8a6b003e3874
- Parent:
- 0:910f5949759f
- Child:
- 4:539df159e058
--- a/source/http_response_parser.h Thu Feb 16 13:55:05 2017 +0100
+++ b/source/http_response_parser.h Thu Feb 23 13:28:07 2017 +0100
@@ -90,11 +90,14 @@
return 0;
}
- static int on_headers_complete(http_parser* parser) {
+ int on_headers_complete(http_parser* parser) {
+ response->set_headers_complete();
return 0;
}
int on_body(http_parser* parser, const char *at, size_t length) {
+ response->increase_body_length(length);
+
if (body_callback) {
body_callback(at, length);
return 0;
