使用 HttpClient 写入正文请求
2022-08-31 15:17:45
我想用XML内容类型编写请求的正文,但我不知道如何使用HttpClient对象(http://hc.apache.org/httpclient-3.x/apidocs/index.html )
DefaultHttpClient httpClient = new DefaultHttpClient();
HttpPost httpRequest = new HttpPost(this.url);
httpRequest.setHeader("Content-Type", "application/xml");
而且我不知道如何继续用我的XML编写正文...