Package org.apache.http.client.methods

Examples of org.apache.http.client.methods.HttpDelete.releaseConnection()


                    log.error("error deleting configuration {}: {} {}",new Object[] {key,response.getStatusLine().getStatusCode(),response.getStatusLine().getReasonPhrase()});
                    throw new MarmottaClientException("error deleting configuration "+key+": "+response.getStatusLine().getStatusCode() + " " + response.getStatusLine().getReasonPhrase());
            }

        } finally {
            delete.releaseConnection();
        }
    }

}
View Full Code Here


            }

        } catch (UnsupportedEncodingException e) {
            log.error("could not encode URI parameter",e);
        } finally {
            delete.releaseConnection();
        }
    }
   
    private String getServiceUrl(String uri) throws UnsupportedEncodingException {
        return config.getMarmottaUri() + URL_RESOURCE_SERVICE + "?uri=" + URLEncoder.encode(uri,"utf-8");   
View Full Code Here

      result = false;
    } catch (IOException e) {
      log.error(e.getMessage(), e);
      result = false;
    } finally {
        delete.releaseConnection();
        }
        return result;

    }
View Full Code Here

        log.debug("DELETE url: {}", requestURL);
        HttpDelete request = new HttpDelete(requestURL);
        // send the request and print the response
        HttpResponse httpResponse = httpClient.execute(request);
        ApiResponse apiResponse = readResponse(httpResponse);
        request.releaseConnection();
        return apiResponse;
    }
   
    public ApiResponse put(String requestURL, ApiRequest message) throws IOException, SignatureException {
        log.debug("PUT url: {}", requestURL);
View Full Code Here

                    log.error("error deleting configuration {}: {} {}",new Object[] {key,response.getStatusLine().getStatusCode(),response.getStatusLine().getReasonPhrase()});
                    throw new MarmottaClientException("error deleting configuration "+key+": "+response.getStatusLine().getStatusCode() + " " + response.getStatusLine().getReasonPhrase());
            }

        } finally {
            delete.releaseConnection();
        }
    }

}
View Full Code Here

            responseString = readString(response);
            assertEquals(SC_OK, status);
            assertEquals("Purge relationship", "false", responseString);
        } finally {
            if (get != null) get.releaseConnection();
            if (delete != null) delete.releaseConnection();
        }
    }

    @Test
    public void testDisseminationContentLengthWhenKnown() throws Exception {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.