I am working on a RAK8211 module with Espruino 2v01.17
I have been able to successfully send data using the http module with a "POST" request.
I am now trying to receive data from a server. To do this I am sending this HTTP request:
GET /api/v1/devices/configuration HTTP/1.1
User-Agent: Espruino 2v01.17
Content-Type: application/json
Host: serverPath.com
This is the data I am expecting, and the data that I am actually receiving:
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
I am working on a RAK8211 module with Espruino 2v01.17
I have been able to successfully send data using the http module with a "POST" request.
I am now trying to receive data from a server. To do this I am sending this HTTP request:
This is the data I am expecting, and the data that I am actually receiving:
Expected:
Received:
As you can see, the response is truncated.
I have tried this using both the http.get function and using the http.request function, both results in the same output.
What is interesting is that the content length is 300, but only 168 characters are printed.
When I do a print(res.available()) it returns 168
The response from the server has the following headers:
Why would the available bytes be showing only 168 when the Content-Length is 300 bytes?
Some more detailed information of things I've tried below: