-1
일부 클래스가 사용되지 않으므로 아래 코드와 동일한 기능을 제공합니다. Android - Apache에서 사용하지 않는 클래스와 동일
try
{
DefaultHttpClient httpClient = new DefaultHttpClient();
HttpPost httpPost = new HttpPost(url);
HttpResponse httpResponse = httpClient.execute(httpPost);
HttpEntity httpEntity = httpResponse.getEntity();
is = httpEntity.getContent();
}
catch (Exception e)
{
e.printStackTrace();
}
지금까지 나는이 작성한하지만 내가 뭔가 내 요청 잘못 생각 나는 예외를 받고 있어요 요청 후
HttpURLConnection httpUrlConnection = null;
try
{
URL mUrl = new URL(url);
httpUrlConnection = (HttpURLConnection) mUrl.openConnection();
httpUrlConnection.setRequestMethod("POST");
httpUrlConnection.connect();
is = new BufferedInputStream(httpUrlConnection.getInputStream());
httpUrlConnection.disconnect();
}
catch(Exception e)
{
e.printStackTrace();
}
작동하지 않습니다.
'httpUrlConnection.disconnect은() : Build.grade에서 최상위 파일이 라인
그리고 이러한 응용 프로그램의 수준 build.gradle를 넣어 연결 해제 하시겠습니까? – njzk2