首页 > 技术文章 > BasicNetwork.performRequest: Unexpected response code 404

share2015 2016-03-01 19:06 原文

例如:
BasicNetwork.performRequest: Unexpected response code 404 for http://geci.me/api/lyric/喜欢你
在volley中,如果网址中有中文,程序中转化不了,则出现此错误。

同样的网址,应该通过方法转为:方法:Code=URLEncoder.encode("喜欢你","utf-8");
http://geci.me/api/lyric/%E5%96%9C%E6%AC%A2%E4%BD%A0

推荐阅读