InvalidURIError(壞的URI(是不是URI)?:https://api.flightstats.com/flex/schedules/rest/v1/json/from/VNS/to/DEL/departing/2017/ 8/7的appid = 94f56975 &的AppKey = 0a0dc2b64f177ab866f0dba59342ffa4)獲得一些領域 怎麼解決這個error.useing httparty post方法。InvalidURIError時httparty post方法,並通過用戶
飛行= HTTParty.post(」 https://api.flightstats.com/flex/schedules/rest/v1/json/from/# {PARAMS [:從]} /到/#{PARAMS [:至]} /出發/#{PARAMS [:年]}/ #{PARAMS [:月] } /#{params [:day]}?appId = 94f56975 & appKey = 0a0dc2b64f177ab866f0dba59342ffa4「)
HTTParty.post(「https://api.flightstats.com/flex/schedules/rest/v1/json/from/#{params[:from]}/to /#{params [:to]}/departure /#{params [:year]} /#{params [:month]} /#{params [:day]}?appId = 94f56975&appKey = 0a0dc2b64f177ab866f0dba59342ffa4「) – rohan
after刪除空格,@headers = {「server」=> [「Apache-Coyote/1.1」 ],「allow」=> [「HEAD,GET,OPTIONS」],「content-length」=> [「0」],「date」=> [「Sun,06 Aug 2017 14:15:32 GMT」] ,「連接」=> [「關閉」]}> –
rohan
你說的是正確的。如何獲得我們的需求數據,因爲我不使用flightstats api .. – rohan