public class ClientUtils extends Object
| Modifier and Type | Field and Description |
|---|---|
private com.sun.jersey.api.client.Client |
client |
| Constructor and Description |
|---|
ClientUtils(com.sun.jersey.api.client.Client client) |
| Modifier and Type | Method and Description |
|---|---|
com.sun.jersey.api.client.ClientResponse |
get(URI uri)
Gets the content at the specified URI.
|
com.sun.jersey.api.client.ClientResponse |
get(URI uri,
Map<String,String> queryParams)
Gets the content at the specified URI using the given query parameters.
|
com.sun.jersey.api.client.ClientResponse |
head(URI uri)
Performs a HEAD request to the specified URI.
|
com.sun.jersey.api.client.ClientResponse |
post(URI uri,
Map<String,String> formData)
Performs a POST using the specified url and form data.
|
com.sun.jersey.api.client.ClientResponse |
post(URI uri,
Object entity)
Performs a POST using the specified url and entity body.
|
public com.sun.jersey.api.client.ClientResponse get(URI uri) throws com.sun.jersey.api.client.ClientHandlerException, com.sun.jersey.api.client.UniformInterfaceException
uri - the URI to get the content ofcom.sun.jersey.api.client.ClientHandlerException - if issues occur handling the requestcom.sun.jersey.api.client.UniformInterfaceException - if any interface violations occurpublic com.sun.jersey.api.client.ClientResponse get(URI uri, Map<String,String> queryParams) throws com.sun.jersey.api.client.ClientHandlerException, com.sun.jersey.api.client.UniformInterfaceException
uri - the URI to get the content ofqueryParams - the query parameters to use in the requestcom.sun.jersey.api.client.ClientHandlerException - if issues occur handling the requestcom.sun.jersey.api.client.UniformInterfaceException - if any interface violations occurpublic com.sun.jersey.api.client.ClientResponse post(URI uri, Object entity) throws com.sun.jersey.api.client.ClientHandlerException, com.sun.jersey.api.client.UniformInterfaceException
uri - the URI to post toentity - the item to postcom.sun.jersey.api.client.ClientHandlerExceptioncom.sun.jersey.api.client.UniformInterfaceExceptionpublic com.sun.jersey.api.client.ClientResponse post(URI uri, Map<String,String> formData) throws com.sun.jersey.api.client.ClientHandlerException, com.sun.jersey.api.client.UniformInterfaceException
uri - the uri to post toformData - the data to postcom.sun.jersey.api.client.ClientHandlerExceptioncom.sun.jersey.api.client.UniformInterfaceExceptionpublic com.sun.jersey.api.client.ClientResponse head(URI uri) throws com.sun.jersey.api.client.ClientHandlerException, com.sun.jersey.api.client.UniformInterfaceException
uri - the uri to request the head ofcom.sun.jersey.api.client.ClientHandlerException - for issues handling the requestcom.sun.jersey.api.client.UniformInterfaceException - for issues with the requestCopyright © 2015 Apache NiFi Project. All rights reserved.