如何向ThingSpeak发送POST?

时间:2016-12-19 02:37:35

标签: http post get arduino

如何通过www.requestmaker.com向ThingSpeak发送POST?

我用这个:

POST /update HTTP/1.1
Host: api.thingspeak.com
Connection: close
X-THINGSPEAKAPIKEY: XXXXXXXXXXXXXXXX
Content-Type: application/x-www-form-urlencoded\
Content-Length: 24
field1=34&field2=1

但我得到了这样的答复:

HTTP/1.1 404 Not Found
Content-Type: text/html; charset=utf-8
Content-Length: 728
Connection: close
Status: 404 Not Found
X-Request-Id: 36c8113c-3671-4302-85fa-f3ecdba364dc
X-Runtime: 0.019035
X-Powered-By: Phusion Passenger 4.0.57
Date: Mon, 19 Dec 2016 02:36:42 GMT
Server: nginx/1.9.3 + Phusion Passenger 4.0.57

任何解决方案?

1 个答案:

答案 0 :(得分:1)

确保您拥有正确的API密钥 - 通常会获得零并且字母“O”不正确。你写的是什么API终点?您可以在ThingSpeak论坛上获得帮助:http://community.thingspeak.com/forum/