[英]Illegal character in query at index in url
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
这个网址给了我我通过android中的get方法访问的错误
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
You have three solutions: 您有三种解决方案:
URI
class; URI
类的构造函数 ; UrlEscapers.urlPathSegmentEscaper()
(which does the job for query parameters despite its name); UrlEscapers.urlPathSegmentEscaper()
(尽管名称正确,但UrlEscapers.urlPathSegmentEscaper()
完成查询参数的工作); All three will produce reliable results for your needs. 这三者将产生可满足您需求的可靠结果。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.