Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
是否可以在 HttpGet 中使用管道字符?
我有一个用管道分隔的纬度列表,例如53.42290885462988,-1.4404749870300293|53.39965626194152,-1.4247894287109375用于谷歌距离矩阵,但是我在管道字符上遇到非法字符错误。
53.42290885462988,-1.4404749870300293|53.39965626194152,-1.4247894287109375
I get an illegal character error on the pipe character.
你需要encode the | (Pipe Charcter)
encode the | (Pipe Charcter)
所以使用URLEncoder.encode("|","UTF-8");
URLEncoder.encode("|","UTF-8");
文档