【发布时间】:2011-06-21 17:58:22
【问题描述】:
我想建立一个 Http 连接这是我的代码
try
{
HttpClient client = new DefaultHttpClient();
HttpPost httpMethod = new HttpPost("http://www.google.co.in/");
String requestBody = "some text";
HttpMethod.setEntity(new StringEntity(requestBody));
HttpResponse response = client.execute(httpMethod);
textView.setText(response.getStatusLine().toString());
}
但我无法获得“HTTP/1.0 405 Method not Allowed”错误 我会感谢你的帮助
【问题讨论】:
标签: android http-status-code-405