【问题标题】:Fiware and IDAS: Issue with SendObsevations.pyFiware 和 IDAS:SendObsevations.py 的问题
【发布时间】:2017-05-25 16:48:36
【问题描述】:

我对 IDAS y Fiware 非常陌生。我正在使用 Figway (https://github.com/telefonicaid/fiware-figway),当我尝试使用此命令发送观察结果时遇到问题:

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。

非常感谢。

【问题讨论】:

    标签: python fiware fiware-orion


    【解决方案1】:

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

    【讨论】:

    • 是的,应该是“Content-type: text/plain”
    猜你喜欢
    • 2017-07-26
    • 2023-03-09
    • 1970-01-01
    • 1970-01-01
    • 2023-04-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多