那個程式原本使用 Apache HTTP Client 中的 HttpPost 物件, 但是從那時起,使用它時便收到 HTTP 的 Return Status Code 為 405 (成功的話應該是 200). 為了查証,再使用一些 Firefox 的 HttpRequester Extension,輸入以下URL:
www.google.com/finance/info?infotype=infoquoteall&q=HKG:0005
格式: www.google.com/finance/info?infotype=infoquoteall&q=[ticker1],[ticker2],...,[ticker-Nth]當使用 POST Method 時,回傳了只接受 GET 及 HEAD,所以我必須修改程式為 HttpGet 物件,程式才能正常運作。
大家有遇到相同問題嗎?
沒有留言:
發佈留言