我想對ContextBroker
V1.5.0註冊天氣FORCAST但得到以下錯誤: -錯誤登記天氣數據推算未來模型(NGSI V2)
400錯誤的請求 { 「錯誤」: 「錯誤請求」, 「描述」: 「屬性必須是JSON對象,除非鍵值選項用於」 }
請求: POST http://[ContextBroker IP]:1026/V2 /實體
請求頭: 內容類型:應用程序/ JSON
這裏是有效載荷
{
"feelsLikeTemperature":31.8,
"dayMinimum":{"feelsLikeTemperature":31.8,"temperature":0.0,"relativeHumidity":31.0},
"temperature":0.0,
"dateCreated":"2016-12-01T12:05:00+05:30",
"type":"WeatherForecast",
"address":{"addressCountry":"IN","postalCode":"452001","addressLocality":"Indore"},
"windSpeed":3.7,
"validity":{"to":"2016-12-01T06:44:37Z","from":"2016-12-01T06:44:37Z"},
"source":"http://dataservice.accuweather.com/",
"precipitationProbability":0,
"dayMaximum":{"feelsLikeTemperature":31.8,"temperature":0.0,"relativeHumidity":31.0},
"weatherType":"Partly sunny",
"windDirection":"ENE",
"id":"452001_IN_YYYY-12-DD ",
"relativeHumidity":31.0
}
我FIWARE
數據模型驗證了http://fiware-datamodels.readthedocs.io/en/latest/Weather/WeatherForecast/doc/spec/index.html但它似乎並不奏效。有沒有人知道解決這個問題?
您已經在問題文章中包含了請求的有效載荷。你可以編輯它以至少包含動詞+ URL(如果你還可以在請求中包含HTTP標頭,那麼這樣會更好嗎?)?謝謝! – fgalan