Android: How get the status-code of an HttpClient request
        Posted  
        
            by Mannaz
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by Mannaz
        
        
        
        Published on 2010-04-07T13:37:40Z
        Indexed on 
            2010/04/07
            13:43 UTC
        
        
        Read the original article
        Hit count: 380
        
I want to download a file from and need to check the response status code (ie HTTP /1.1 200 OK).
This is a snipped of my code:
HttpGet httpRequest = new HttpGet(myUri);
HttpEntity httpEntity = null;
HttpClient httpclient = new DefaultHttpClient();
HttpResponse response = httpclient.execute(httpRequest);
...
How do i get the status-code of the response?
© Stack Overflow or respective owner