我需要使用参数向服务器发送 https 请求,其中一个参数是 URL:我接下来要做:
HttpClient httpClient = new DefaultHttpClient();
HttpPost httpPost = new HttpPost(APIURL);
httpPost.setHeader("Content-Type", "application/x-www-form-urlencoded");
List<NameValuePair> params = new ArrayList<NameValuePair>();
params.add(new BasicNameValuePair("url", "https://api/v1/pictureadress/id"));
...
添加 URL 参数时出现错误。但是,如果我添加除 url 之外的其他参数,例如年龄、性别等。我没有错误。我做错了什么?