Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
5 years, 7 months ago.
Issues of mbed-http library with Google Firebase
I am working on an IoT project using DISCO-L475VG-IOT01A and Google Firebase. I have found several issues while working on Firebase's REST API as follows.
- Example code refers to non-existing code in http_response.h file.
- no get_error() method in HttpResponse class definition
- get_body() will return character pointer which can not be used as a String object.
Copied from mbed-http website
// if response is NULL, check response->get_error() printf("status is %d - %s\n", response->get_status_code(), response->get_status_message()); printf("body is:\n%s\n", response->get_body().c_str());
- No PUT and PATCH method in http_parser.c file. These methods are used for referencing an absolute path in Realtime Database.
case 'P': parser->method = HTTP_POST; /* or PROPFIND|PROPPATCH|PUT|PATCH|PURGE */
- HttpResponse get_body() and get_body_as_string().c_str() get different result get_body_as_string() method will return the expected body string. But get_body() method will return the expected string + "quic0" attached.