简体   繁体   English

Fiware和IDAS:SendObsevations.py问题

[英]Fiware and IDAS: Issue with SendObsevations.py

I am very new with IDAS y Fiware. 我是IDAS和Fiware的新手。 I am working with the Figway ( https://github.com/telefonicaid/fiware-figway ) and I have a problem when I tried to send observations with this command: 我正在使用Figway( https://github.com/telefonicaid/fiware-figway ),当我尝试使用此命令发送观察时出现问题:

python SendObservation.py sensor001x 't|23'

This is the response: 这是回应:

* Asking to http://130.206.80.43:7896/iot/d?k=4jggokgpepnvsb2uv4s40d59ov&i=sensor001x
* Headers: {'Fiware-Service': 'OpenIoT', 'content-type': 'application/json', 'Fiware-ServicePath': '/', 'X-Auth-Token': 'NULL'}
* Sending PAYLOAD: 
t|23

...

* Status Code: 400
* Response: 
{"name":"UNSUPPORTED_TYPE","message":"The request content didn't have the expected type [text/plain ]"}

Could you help me with that? 你能帮帮我吗? Where I am wrong? 哪里错了? I working with a RaspberryPi. 我使用RaspberryPi。

Thanks a lot. 非常感谢。

不确定是否可能与问题的原因有关,但使用Content-Type: application/json而实际有效负载不是JSON(它是t|23 ,我理解对应text / plain)似乎是错误的。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM