http://search-gf-slvaax6ij6m7ohb7at3ki2kvua.us-east-1.xxxx.yyy.com/2013-01-01/search?q=abc&facet.mod={sort:'count'}&facet.topic={sort:'count'}
this url gives me a error whwn i access through get method in android
error:Illegal character in query at index
最佳答案
尝试对查询字符串中的字符进行 URL 编码,如下所示:
http://search-gf-slvaax6ij6m7ohb7at3ki2kvua.us-east-1.xxxx.yyy.com/2013-01-01/search?q=abc&facet.mod=%7bsort%3a%27count%27%7d&facet.topic=%7bsort%3a%27count%27%7d
关于java - url 索引查询中的非法字符,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22783573/