2

是否可以在 HttpGet 中使用管道字符?

我有一个用管道分隔的纬度列表,例如53.42290885462988,-1.4404749870300293|53.39965626194152,-1.4247894287109375用于谷歌距离矩阵,但是我在管道字符上遇到非法字符错误。

4

1 回答 1

1
I get an illegal character error on the pipe character.

你需要encode the | (Pipe Charcter)

所以使用URLEncoder.encode("|","UTF-8");

文档

于 2013-09-30T12:05:21.093 回答