2017-05-25 3 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

実際のペイロードがJSONではないのに(t|23、これはテキスト/プレーンに対応する)間違っているようですが、問題の原因と関連している可能性がありますが、Content-Type: application/jsonを使用しているかどうかはわかりません。

+1

はい、「Content-type:text/plain」である必要があります。 – jicarretero

関連する問題