JAVA언어 httpClient 코딩 천상의날개 2011. 1. 13. 11:39 httpClient try { HttpClient client = new DefaultHttpClient(); String postURL = "http://www.naver.com/"; HttpPost post = new HttpPost(postURL); List<NameValuePair> params = new ArrayList<NameValuePair>(); params.add(new BasicNameValuePair("test","testtest")); UrlEncodedFormEntity ent = new UrlEncodedFormEntity(params,HTTP.UTF_8); post.setEntity(ent); HttpResponse responsePOST = client.execute(post); HttpEntity resEntity = responsePOST.getEntity(); if(resEntity != null){ //성공임 EntityUtils.toString(resEntity); } } catch (Exception e) { // TODO: handle exception }