Package com.persequor.extension.rest
Interface IHttpClient
public interface IHttpClient
-
Method Summary
Modifier and TypeMethodDescriptiondelete
(String path, HttpHeaders headers) Send a HTTP DELETE request to the specified URLdelete
(String path, HttpHeaders headers, IRequestConfig config) Send a HTTP DELETE request to the specified URLget
(String path, HttpHeaders headers) Send a HTTP GET request to the specified URLget
(String path, HttpHeaders headers, IRequestConfig config) Send a HTTP GET request to the specified URLhead
(String path, HttpHeaders headers) Send a HTTP HEAD request to the specified URLhead
(String path, HttpHeaders headers, IRequestConfig config) Send a HTTP HEAD request to the specified URLpatch
(String path, HttpContent content, HttpHeaders headers) Send a HTTP PATCH request to the specified URLpatch
(String path, HttpContent content, HttpHeaders headers, IRequestConfig config) Send a HTTP PATCH request to the specified URLpost
(String path, Model content, HttpHeaders headers) Send a HTTP POST request to the specified URL.post
(String path, Model content, HttpHeaders headers, IRequestConfig config) Send a HTTP POST request to the specified URL.post
(String path, HttpContent content, HttpHeaders headers) Send a HTTP POST request to the specified URLpost
(String path, HttpContent content, HttpHeaders headers, IRequestConfig config) Send a HTTP POST request to the specified URLput
(String path, HttpContent content, HttpHeaders headers) Send a HTTP PUT request to the specified URLput
(String path, HttpContent content, HttpHeaders headers, IRequestConfig config) Send a HTTP PUT request to the specified URLvoid
setAdditionalConfig
(AdditionalHttpClientConfig additionalConfig)
-
Method Details
-
get
HttpResponse get(String path, HttpHeaders headers, IRequestConfig config) throws IOException, HttpResponseException Send a HTTP GET request to the specified URL- Parameters:
path
- URL of the endpointheaders
- request header objectconfig
- request specific config- Returns:
- the endpoint's response to the request
- Throws:
IOException
- throws IOException in case of failure to construct an URL or send the requestHttpResponseException
- See Also:
-
get
Send a HTTP GET request to the specified URL- Parameters:
path
- URL of the endpointheaders
- request header object- Returns:
- the endpoint's response to the request
- Throws:
IOException
- throws IOException in case of failure to construct an URL or send the requestHttpResponseException
- See Also:
-
post
HttpResponse post(String path, HttpContent content, HttpHeaders headers, IRequestConfig config) throws IOException, HttpResponseException Send a HTTP POST request to the specified URL- Parameters:
path
- URL of the endpointcontent
- request bodyconfig
- request specific configheaders
- request header object- Returns:
- the endpoint's response to the request
- Throws:
IOException
- throws IOException in case of failure to construct an URL or send the requestHttpResponseException
- See Also:
-
post
HttpResponse post(String path, HttpContent content, HttpHeaders headers) throws IOException, HttpResponseException Send a HTTP POST request to the specified URL- Parameters:
path
- URL of the endpointcontent
- request bodyheaders
- request header object- Returns:
- the endpoint's response to the request
- Throws:
IOException
- throws IOException in case of failure to construct an URL or send the requestHttpResponseException
- See Also:
-
post
HttpResponse post(String path, Model content, HttpHeaders headers, IRequestConfig config) throws IOException, HttpResponseException, SerializationException Send a HTTP POST request to the specified URL. This method is specifically intended to support EPCIS models- Parameters:
path
- URL of the endpointcontent
- request bodyconfig
- request specific configheaders
- request header object- Returns:
- the endpoint's response to the request
- Throws:
IOException
- throws IOException in case of failure to construct an URL or send the requestSerializationException
- throws SerializationException if content could not be serialized to a StringHttpResponseException
- See Also:
-
post
HttpResponse post(String path, Model content, HttpHeaders headers) throws IOException, HttpResponseException, SerializationException Send a HTTP POST request to the specified URL. This method is specifically intended to support EPCIS models- Parameters:
path
- URL of the endpointcontent
- request bodyheaders
- request header object- Returns:
- the endpoint's response to the request
- Throws:
IOException
- throws IOException in case of failure to construct an URL or send the requestSerializationException
- throws SerializationException if content could not be serialized to a StringHttpResponseException
- See Also:
-
delete
HttpResponse delete(String path, HttpHeaders headers, IRequestConfig config) throws IOException, HttpResponseException Send a HTTP DELETE request to the specified URL- Parameters:
path
- URLheaders
- request header objectconfig
- request specific config- Returns:
- the endpoint's response to the request
- Throws:
IOException
- throws IOException in case of failure to construct an URL or send the requestHttpResponseException
- See Also:
-
delete
Send a HTTP DELETE request to the specified URL- Parameters:
path
- URLheaders
- request header object- Returns:
- the endpoint's response to the request
- Throws:
IOException
- throws IOException in case of failure to construct an URL or send the requestHttpResponseException
- See Also:
-
put
HttpResponse put(String path, HttpContent content, HttpHeaders headers, IRequestConfig config) throws IOException, HttpResponseException Send a HTTP PUT request to the specified URL- Parameters:
path
- URL of the endpointcontent
- request bodyconfig
- request specific configheaders
- request header object- Returns:
- the endpoint's response to the request
- Throws:
IOException
- throws IOException in case of failure to construct an URL or send the requestHttpResponseException
- See Also:
-
put
HttpResponse put(String path, HttpContent content, HttpHeaders headers) throws IOException, HttpResponseException Send a HTTP PUT request to the specified URL- Parameters:
path
- URL of the endpointcontent
- request bodyheaders
- request header object- Returns:
- the endpoint's response to the request
- Throws:
IOException
- throws IOException in case of failure to construct an URL or send the requestHttpResponseException
- See Also:
-
patch
HttpResponse patch(String path, HttpContent content, HttpHeaders headers, IRequestConfig config) throws IOException, HttpResponseException Send a HTTP PATCH request to the specified URL- Parameters:
path
- URL of the endpointcontent
- request bodyconfig
- request specific configheaders
- request header object- Returns:
- the endpoint's response to the request
- Throws:
IOException
- throws IOException in case of failure to construct an URL or send the requestHttpResponseException
- See Also:
-
patch
HttpResponse patch(String path, HttpContent content, HttpHeaders headers) throws IOException, HttpResponseException Send a HTTP PATCH request to the specified URL- Parameters:
path
- URL of the endpointcontent
- request bodyheaders
- request header object- Returns:
- the endpoint's response to the request
- Throws:
IOException
- throws IOException in case of failure to construct an URL or send the requestHttpResponseException
- See Also:
-
head
HttpResponse head(String path, HttpHeaders headers, IRequestConfig config) throws IOException, HttpResponseException Send a HTTP HEAD request to the specified URL- Parameters:
path
- URL of the endpointheaders
- request header objectconfig
- request specific config- Returns:
- the endpoint's response to the request
- Throws:
IOException
- throws IOException in case of failure to construct an URL or send the requestHttpResponseException
- See Also:
-
head
Send a HTTP HEAD request to the specified URL- Parameters:
path
- URL of the endpointheaders
- request header object- Returns:
- the endpoint's response to the request
- Throws:
IOException
- throws IOException in case of failure to construct an URL or send the requestHttpResponseException
- See Also:
-
setAdditionalConfig
-