Notice
Recent Posts
Recent Comments
Link
설.현.아빠
Android HttpPost 본문
ArrayList<NameValuePair> nameValuePairs = new ArrayList<NameValuePair>();
nameValuePairs.add(new BasicNameValuePair("mb_id", "id"));
nameValuePairs.add(new BasicNameValuePair("mb_name", "name"));
nameValuePairs.add(new BasicNameValuePair("mb_nick", "nick"));
try{
HttpClient httpclient = new DefaultHttpClient();
HttpPost httppost = new HttpPost("http://www.***.***/login.php");
httppost.setEntity(new UrlEncodedFormEntity(nameValuePairs,HTTP.UTF_8));
HttpResponse response = httpclient.execute(httppost);
HttpEntity entity = response.getEntity();
InputStream is = entity.getContent();
Log.i("POST_True","");
}
catch(Exception e)
{
Log.e("POST_Fail", e.toString());
}
'안드로이드 > Http' 카테고리의 다른 글
HttpPost setHeader 문제 (0) | 2011.02.17 |
---|---|
Android 에서 Http Post 속도 개선 (0) | 2011.02.17 |
HttpPost 요청 처리하기 (0) | 2011.02.17 |
HttpGet, HttpPost, Multipart Post 예제 (0) | 2011.02.17 |
HttpClient의 HttpPost 방식을 사용한 로그인 처리 예제 (0) | 2011.02.17 |
Comments