안드로이드 개발 질문/답변
(글 수 45,052)
본의아니게 웹서버와 연결하는 app을 개발중인데요
web server경험도 전무하고 안드로이드, 자바도 기초 지식만 있습니다
소스를 보면 서버로 id와 비번을 전송해서 응답을 받아오는 아주 단순한 작업인데
HttpResponse response = client.execute(httppost); 요기서 계속 죽네요
검색해 보니 DefaultHttpClient에서 HttpPost를 파라미터로 갖는 execute멤버 함수는 존재하지도 않고요
아시는 분 계시나요??
DefaultHttpClient client = new DefaultHttpClient(); HttpPost httppost = new HttpPost(URL); List nvps = new ArrayList(); nvps.add(new BasicNameValuePair("id", id)); nvps.add(new BasicNameValuePair("pw", pw)); try { Log.d("YB", "1"); UrlEncodedFormEntity p_entity = new UrlEncodedFormEntity(nvps,HTTP.UTF_8); httppost.setEntity(p_entity); Log.d("YB", "2"); HttpResponse response = client.execute(httppost); Log.d("YB", "3"); HttpEntity responseEntity = response.getEntity(); Log.d("YB", "4");