Code example for HttpRequestBase

Methods: getURI

0
            result=client.execute(request);
        } 
        catch (IOException e)
        { 
            throw new SojournServerException("Server request failed", 
                                             request.getURI(),e);
        } 
         
        //store the status line 
        status=result.getStatusLine();
         
        //check the return code 
        if (status.getStatusCode()!=200)
            throw new SojournServerException("Server request failed: "+ 
                                             status.getStatusCode()+
                                             status.getReasonPhrase(),
                                             request.getURI());
         
        //return the response object 
        return result;
Stop searching for code, let great code find you!  Add Codota to your java IDE