use of org.apache.commons.httpclient.methods.TraceMethod in project camel by apache.
the class NettyHttpTraceDisabledTest method testTraceEnabled.
@Test
public void testTraceEnabled() throws Exception {
HttpClient httpclient = new HttpClient();
TraceMethod trace = new TraceMethod("http://localhost:" + portTraceOn + "/myservice");
httpclient.executeMethod(trace);
// TRACE is now allowed
assertTrue(trace.getStatusCode() == 200);
trace.releaseConnection();
}
use of org.apache.commons.httpclient.methods.TraceMethod in project alfresco-remote-api by Alfresco.
the class PublicApiHttpClient method trace.
public HttpResponse trace(final RequestContext rq, Binding cmisBinding, String version, String cmisOperation) throws IOException {
RestApiEndpoint endpoint = new RestApiEndpoint(rq.getNetworkId(), cmisBinding, version, cmisOperation, null);
String url = endpoint.getUrl();
TraceMethod req = new TraceMethod(url.toString());
return submitRequest(req, rq);
}
Aggregations