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