2017-05-25 35 views
1

我是非常新的IDAS y Fiware。我與Figway(https://github.com/telefonicaid/fiware-figway)工作,我有,當我試圖用這個命令發送觀察一個問題:Fiware和IDAS:問題與SendObsevations.py

python SendObservation.py sensor001x 't|23' 

這是響應:

* 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 ]"} 

你能幫助我嗎?我錯在哪裏?我正在與RaspberryPi合作。

非常感謝。

回答

0

不確定是否可能與問題的原因有關,但使用Content-Type: application/json而實際有效負載不是JSON(它是t|23,我理解其對應於text/plain)似乎是錯誤的。

+1

是的,應該是「Content-type:text/plain」 – jicarretero