gpt4 book ai didi

android - 在android中上传到服务器时获取java.lang.IllegalArgumentException

转载 作者:行者123 更新时间:2023-11-29 21:44:16 26 4
gpt4 key购买 nike

04-30 18:33:23.036: E/AndroidRuntime(22231): java.lang.IllegalArgumentException: Illegal character in query at index 54: http://www.slicapp.com/slic/edit_profile.php?message=[{&email1=prabhjotkaur3@hotmail.com&email2=bgf&email3=hg&facebook=ggf&twitter=&gplus=&youtube=&linkedin=&instagram=&tumblr=ggf&udid1251935507&fbuid1251935507&fbid& fbpw}]
04-30 18:33:23.036: E/AndroidRuntime(22231): at java.net.URI.create(URI.java:970)
04-30 18:33:23.036: E/AndroidRuntime(22231): at org.apache.http.client.methods.HttpPost.<init>(HttpPost.java:79)

最佳答案

您的查询中的 amp & abd fbpw..

之间有一个空格
http://www.slicapp.com/slic/edit_profile.php?message=[{&email1=prabhjotkaur3@hotmail.com&email2=bgf&email3=hg&facebook=ggf&twitter=&gplus=&youtube=&linkedin=&instagram=&tumblr=ggf&udid1251935507&fbuid1251935507&fbid& fbpw}]
^

另外,请注意 this回答,括号 [] 可能需要进行百分比转义(您拥有的第一个是提示的索引)。引用:

The '[' and ']' characters are characters and should be percent escaped if not used as delimiters in the scheme-specific syntax. The spec says:

"URI producing applications should percent-encode data octets that correspond to characters in the reserved set unless these characters are specifically allowed by the URI scheme to represent data in that component."

关于android - 在android中上传到服务器时获取java.lang.IllegalArgumentException,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16300695/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com