我的授权标头是“授权:TRUEREST username=user &password=pass&apikey=key&class=class”。如何将其放入 HTTPPOST 请求..?我正在这样做:
HttpClient httpclient = new DefaultHttpClient();
HttpPost httppost = new HttpPost(url);
httppost.setHeader("Authorization","TRUEREST");
httppost.setHeader("username","user");
httppost.setHeader("password","pass");
httppost.setHeader("apikey","key");
httppost.setHeader("class","class");
不会发送凭据。这段代码有什么问题??请帮助..!! 提前致谢。