1
目前的「=」號是獵戶座中禁止使用的查詢字符串: http://fiware-orion.readthedocs.io/en/1.5.0/user/forbidden_characters/index.htmlFIWARE獵戶座:在認購有效載荷
但是,這可以防止進行了查詢字符串訂閱:
$ (curl broker.waziup.io/v1/subscribeContext -s -S --header 'Content-Type: application/json' \
--header 'Accept: application/json' --header 'Fiware-Service:waziup' --header 'Fiware-ServicePath:/TEST' -d @- | python -mjson.tool) <<EOF
{
"entities": [
{
"type": "SensingDevice",
"isPattern": "false",
"id": "Sensor1"
}
],
"attributes": [
"temperature"
],
"reference": "http://localhost/v1/sms/send?contact=0039&msg=Sensor1",
"duration": "P1M",
"notifyConditions": [
{
"type": "ONCHANGE",
"condValues": [
"temperature"
]
}
],
"throttling": "PT1S"
}
EOF
結果:
{
"subscribeError": {
"errorCode": {
"code": "400",
"details": "Illegal value for JSON field",
"reasonPhrase": "Bad Request"
}
}
}
查詢字符串用於傳遞參數到回調服務器(我沒有看到其他方法來做到這一點)。 任何方法?