Code example for HttpException

0
        String body = client.getBody(response);
        request.releaseConnection();
        if ( statusLine.getStatusCode() == 200) {
            return new Feed( new JSONObject(body) );				
        } else { 
            throw new HttpException("No se ha podido analizar el cuerpo de la respuesta " + response.getStatusLine().toString());
        } 
    } 
     
    /**   
     * Borra la fuente indicada 
     * 
     * @param feed_id identificador 
     * @return Feed feed 
     * @throws Exception 
     */ 
    public void deleteFeed(Integer feed_id) throws Exception {
        HttpDelete request = new HttpDelete("http://api.cosm.com/v2/feeds/"+feed_id);
        HttpResponse response = client.execute(request);
        StatusLine statusLine = response.getStatusLine();
        client.getBody(response);