私はHttpClientを使用してAndroidをDjangoに接続しています。今、私は応答コードを見つける必要があります。私は次を疲れました
String url = "http://10.0.2.2:8000/api/ecp/profile/?format=json";
HttpClient client = new DefaultHttpClient();
HttpGet httpget = new HttpGet(url);
httpget.setHeader("AUTHORIZATION", un.getText().toString()+":"+hash);
client.execute(httpget);
int code = client.getStatusLine().getStatusCode();
しかし、それは次のエラーをスローします
The method getStatusLine() is undefined for the type HttpClient
何をすべきか考えていますか?ありがとう