Hi!
We are trying to send an HTTP request to our AWS Web Server.
The problem that we are figuring out now is that we don't know the way to add a body to our request.
We based our code on the Connection Example provided by Nordic (https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/samples/nrf9160/https_client/README.html), but It doesn't work. Sometimes we have no response and sometimes we obtain a "BAD REQUEST" response from the server.
#define BODY "{ \"jsonrpc\": \"2.0\", \"method\": \"eth_chainId\" }" #define HTTP_HEAD "POST HTTP/1.1\r\n"\ "Host: "HTTPS_HOSTNAME"\r\n"\ "Connection: close\r\n"\ "Content-type: application/json\r\n"\ ""BODY"\r\n\r\n"
We need your help! Thank you!