我正在使用 Arduino Galileo 使用 REST API 在 plot.ly 上绘制图表。使用此代码
client.println("POST /clientresp HTTP/1.1");
//client.println("Host: 107.21.214.199");
client.println("Host: plot.ly");
client.println("User-Agent: Galileo/0.0.1");
client.print("Content-Length: ");
int content_length = 276 + username.length() + api_key.length() + temperaturesY.length() + timesX.length();
client.println(content_length);
client.println();
client.print("version=2.3&origin=plot&platform=Galileo&un=");
client.print(username);
client.print("&key=");
client.print(api_key);
client.print("&args={\"x\":");
client.print(timesX);
client.print(",\"y\":");
client.print(temperaturesY);
client.print(",\"type\":\"scatter\",\"mode\":\"lines+markers\",\"visible\":true}&kwargs={\"filename\":\"galileo_temperature\",\"fileopt\":\"overwrite\",\"style\":{\"type\":\"line\"},\"layout\":{\"title\":\"Galileo CPU Temperature\"},\"world_readable\":true}");
client.println();
我收到此错误:
{"url": "", "message": "", "warning": "", "filename": "", "error": "Missing required POST parameters: platform un key origin args kwargs"}
如何适应这个?