+IPD,288:HTTP/1.1 400 Bad Request when sending data to Thinkspeak | ESP Wi-Fi | Forum

Avatar

Please consider registering
Guest

sp_LogInOut Log In sp_Registration Register

Register | Lost password?
Advanced Search

— Forum Scope —






— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

sp_Feed sp_TopicIcon
+IPD,288:HTTP/1.1 400 Bad Request when sending data to Thinkspeak
No permission to create posts
September 20, 2019
5:16 pm
Avatar
manuab
New Member
Members
Forum Posts: 1
Member Since:
September 20, 2019
sp_UserOfflineSmall Offline

Hi,

I have run into this error:

+IPD,288:HTTP/1.1 400 Bad Request
Server: awselb/2.0
Date: Fri, 20 Sep 2019 20:40:37 GMT
Content-Type: text/html
Content-Length: 138
Connection: close

400 Bad Request

400 Bad Request

This is my post data

http://api.thingspeak.com/update.json?api_key=XXXXXXXXXXXXXXX&field1=73
POST /update HTTP/1.1
Host: api.thingspeak.com
Connection: close
Content-Type: application/x-www-form-urlencoded
Content-Length: 207
CLOSED

If I copy and paste the URL into a browser, I can see the values being updated on the thingspeak.com server.
Any idea, what would be the issue ?

The log looks thus:
WIFI CONNECTED
WIFI GOT IP
OK
+CIFSR
+CIFSR:APIP,"192.168.4.1"
+CIFSR:APMAC,"ee:fa:bc:a9:1e:fd"
+CIFSR:STAIP,"192.168.1.36"
+CIFSR:STAMAC,"ec:fa:bc:a9:1e:fd"
OK
+CIPSTART="TCP","api.thingspeak.com",80
CONNECT
OK
+CIPSEND=214
OK
>
Recv 214 bytes
SEND OK

+IPD,288:HTTP/1.1 400 Bad Request
Server: awselb/2.0
Date: Fri, 20 Sep 2019 21:12:43 GMT
Content-Type: text/html
Content-Length: 138
Connection: close

400 Bad Request

400 Bad Request

CLOSED

Any suggestions ?

Thanks

September 22, 2019
6:30 pm
Avatar
Vinod

MathWorks
Members
Forum Posts: 332
Member Since:
May 1, 2016
sp_UserOfflineSmall Offline

Have you considered using the ThingSpeak client libraries (https://github.com/mathworks/thingspeak-arduino) to send data to ThingSpeak? There are specific examples that show you how to do it with the Arduino, ESP8266 and the ESP32 that allow you to write higher level code. Do remember to check out the examples: https://github.com/mathworks/thingspeak-arduino/tree/master/examples

Good luck!

PS: Consider posting future questions to MATLAB Answers (linked straight off the menu at https://thingspeak.com)

Forum Timezone: America/New_York

Most Users Ever Online: 166

Currently Online:
15 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

rw950431: 272

Vinod: 240

piajola: 95

turgo: 70

vespapierre: 63

Adarsh_Murthy: 62

Member Stats:

Guest Posters: 1

Members: 8665

Moderators: 1

Admins: 2

Forum Stats:

Groups: 3

Forums: 14

Topics: 1600

Posts: 5760

Newest Members:

titan83, Svetoslav, abubakar, shindepavan551@gmail.com, fet61-fakohse, Mario Marquez

Moderators: cstapels: 460

Administrators: Hans: 405, lee: 457