0
我使用simplehttp來查詢網頁。例如:讓webLink =「www.example.com/」和數字= 257(從文件中讀取數字)。Haskell:simplehttp追加「%0D」?
res <- simpleHttp $ "webLink" ++ number
它工作正常的Windows,但在Mac上,它拋出錯誤404的「www.example.com/257%0D」 其表現路徑我不知道在哪裏這個「%0D」是來自印刷號碼給我257。我曾嘗試過濾「%0D」,就像下面一樣,但仍然顯示錯誤404,由於%0D在路徑中...請建議。
res <- simpleHttp $ (filter (not . (`elem` "%0D")) ("webLink" ++ number))
這應該可能是'%0D'(帶零)。 – chepner