Java Code Examples for com.sun.jersey.api.client.WebResource.Builder#delete()
The following examples show how to use
com.sun.jersey.api.client.WebResource.Builder#delete() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: RestRequestSender.java From osiris with Apache License 2.0 | 6 votes |
public <T> ClientResponse<T> invoke(RestMethod method, String url, Class<T> expectedResponse, BasicAuth basicAuth, Headers... headers) { Builder builder = createBuilder(url, headers, basicAuth); com.sun.jersey.api.client.ClientResponse clienteResponse = null; switch (method) { case GET: clienteResponse = builder.get(com.sun.jersey.api.client.ClientResponse.class); break; case DELETE: clienteResponse = builder.delete(com.sun.jersey.api.client.ClientResponse.class); break; case HEAD: clienteResponse = builder.head(); break; default: throw new UnsupportedOperationException(); } return new ClientResponse<T>(clienteResponse, expectedResponse); }
Example 2
Source File: RestRequestSender.java From osiris with Apache License 2.0 | 6 votes |
public <T> ClientResponse<T> invoke(RestMethod method, String url, GenericType<T> genericType, BasicAuth basicAuth, Headers... headers) { Builder builder = createBuilder(url, headers, basicAuth); com.sun.jersey.api.client.ClientResponse clienteResponse = null; switch (method) { case GET: clienteResponse = builder.get(com.sun.jersey.api.client.ClientResponse.class); break; case DELETE: clienteResponse = builder.delete(com.sun.jersey.api.client.ClientResponse.class); break; default: throw new UnsupportedOperationException(); } return new ClientResponse<T>(clienteResponse, genericType); }
Example 3
Source File: RestRequestSender.java From osiris with Apache License 2.0 | 6 votes |
public <T> ClientResponse<T> invoke(RestMethod method, String url, Object requestEntity, Class<T> expectedResponse, BasicAuth basicAuth, Headers... headers) { Builder builder = createBuilder(url, headers, basicAuth); com.sun.jersey.api.client.ClientResponse clienteResponse = null; switch (method) { case POST: clienteResponse = builder.post(com.sun.jersey.api.client.ClientResponse.class, requestEntity); break; case PUT: clienteResponse = builder.put(com.sun.jersey.api.client.ClientResponse.class, requestEntity); break; case DELETE: clienteResponse = builder.delete(com.sun.jersey.api.client.ClientResponse.class, requestEntity); break; default: throw new UnsupportedOperationException(); } return new ClientResponse<T>(clienteResponse, expectedResponse); }
Example 4
Source File: RestRequestSender.java From osiris with Apache License 2.0 | 6 votes |
public <T> ClientResponse<T> invoke(RestMethod method, String url, Object requestEntity, GenericType<T> genericType, BasicAuth basicAuth, Headers... headers) { Builder builder = createBuilder(url, headers, basicAuth); com.sun.jersey.api.client.ClientResponse clienteResponse = null; switch (method) { case POST: clienteResponse = builder.post(com.sun.jersey.api.client.ClientResponse.class, requestEntity); break; case PUT: clienteResponse = builder.put(com.sun.jersey.api.client.ClientResponse.class, requestEntity); break; case DELETE: clienteResponse = builder.delete(com.sun.jersey.api.client.ClientResponse.class, requestEntity); break; default: throw new UnsupportedOperationException(); } return new ClientResponse<T>(clienteResponse, genericType); }
Example 5
Source File: RestRequestSender.java From osiris with Apache License 2.0 | 5 votes |
public SimpleClientResponse invoke(RestMethod method, String url, BasicAuth basicAuth, Headers... headers) { Builder builder = createBuilder(url, headers, basicAuth); com.sun.jersey.api.client.ClientResponse clienteResponse = null; switch (method) { case GET: clienteResponse = builder.get(com.sun.jersey.api.client.ClientResponse.class); break; case DELETE: clienteResponse = builder.delete(com.sun.jersey.api.client.ClientResponse.class); break; case POST: clienteResponse = builder.post(com.sun.jersey.api.client.ClientResponse.class); break; case PUT: clienteResponse = builder.put(com.sun.jersey.api.client.ClientResponse.class); break; case HEAD: clienteResponse = builder.head(); break; default: throw new UnsupportedOperationException(); } return new SimpleClientResponse(clienteResponse); }