51Degrees Pipeline for Java

fiftyone.pipeline.engines.services.HttpClient Interface Reference

Detailed Description

Interface used by the DataUpdateService to process HTTP requests.

Inheritance diagram for fiftyone.pipeline.engines.services.HttpClient:

[legend]

Collaboration diagram for fiftyone.pipeline.engines.services.HttpClient:

[legend]

Public Member Functions

HttpURLConnection connect (URL url) throws IOException
 Connect to a URL.
String postData (HttpURLConnection connection, Map< String, String > headers, byte[] data) throws IOException
 Post data to a connection opened by the connect(URL) method.
String getResponseString (HttpURLConnection connection) throws IOException
 Carry out a get request to a connection opened by the connect(URL) method and return the response string.
String getResponseString (HttpURLConnection connection, Map< String, String > headers) throws IOException
 Carry out a get request to a connection opened by the connect(URL) method and return the response string.

Member Function Documentation

◆ connect()

HttpURLConnection fiftyone.pipeline.engines.services.HttpClient.connect ( URL url) throws IOException

Connect to a URL.

Parameters
urlthe URL to connect to
Returns
the open HTTP connection
Exceptions
IOExceptionif a connection error occurred

Implemented in fiftyone.pipeline.engines.services.HttpClientDefault.

◆ getResponseString() [1/2]

String fiftyone.pipeline.engines.services.HttpClient.getResponseString ( HttpURLConnection connection) throws IOException

Carry out a get request to a connection opened by the connect(URL) method and return the response string.

Parameters
connectionopen connection to get
Returns
response string from request
Exceptions
IOExceptionif an HTTP exception occurred

Implemented in fiftyone.pipeline.engines.services.HttpClientDefault.

◆ getResponseString() [2/2]

String fiftyone.pipeline.engines.services.HttpClient.getResponseString ( HttpURLConnection connection,
Map< String, String > headers ) throws IOException

Carry out a get request to a connection opened by the connect(URL) method and return the response string.

Parameters
connectionopen connection to get
headersHTTP header to send with the request
Returns
response string from request
Exceptions
IOExceptionif an HTTP exception occurred

Implemented in fiftyone.pipeline.engines.services.HttpClientDefault.

◆ postData()

String fiftyone.pipeline.engines.services.HttpClient.postData ( HttpURLConnection connection,
Map< String, String > headers,
byte[] data ) throws IOException

Post data to a connection opened by the connect(URL) method.

Parameters
connectionopen connection to post to
headersHTTP header to send with the request
datadata to post
Returns
response message from request
Exceptions
IOExceptionif an HTTP exception occurred

Implemented in fiftyone.pipeline.engines.services.HttpClientDefault.