Hi all, I’m trying to use Blynk with STM32, so I trying to send http requests to the Blynk server.
GET method work fine, but PUT method causes error #500.
Below is my request to the cloud.blynk.cc:8080:
PUT /my_auth_token/pin/v1 HTTP/1.1
Host: cloud.blynk.cc
Content-Type: application/json
["1"]
And this is response from the Blynk server:
HTTP/1.1 500 Internal Server Error
Connection: keep-alive
Content-Type: text/plain
Content-Length: 26
Error parsing body param.
Local servers are available for around $10 these days but if a local server isn’t an option then it is a waiting game. As I said maybe PUT is available on the Blynk server but whenever I have tried it, last time was a few days ago, I too get the error.
@Costas Yes, but we don’t announce it yet as still some works should be done here. (certificates, 80 port, etc). We don’t have time for that at the moment .
I use custom driver for CC3100. Before I send this request to the Blynk web server, I run simple TCP socket listener on my PC and connect MCU to this local TCP socket for listening my PUT request. It was exactly like in my first message in that forum thread. After that I just change IP to 45.55.195.102 (cloud.blynk.cc) and port to 8080.
In addition, the GET request works correctly, so this indicates that the http connection works correctly.
It is hard to say what exactly is wrong. As I’m not C guy and I has no clue how does that string parsed within your code. Could you please post all code for HTTP request? GET also would be helpful.
Hack with " need for inserting to the string raw " symbol, because standalone " symbol indicates end of string in C.
Also I tried with ['1'] - it isn’t working too.
Can you also tell why I should send requests on the 8080 port, whereas documentation says that I should use 8442 port without SSL/TLS or 8441 with SSL/TLS?