◆ connect()
HttpURLConnection fiftyone.pipeline.engines.services.HttpClient.connect | ( | URL | url | ) | throws IOException |
Connect to a URL.
- Parameters
-
- url - the URL to connect to
- Returns
- the open HTTP connection
- Exceptions
-
- IOException - if 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
-
- connection - open connection to get
- Returns
- response string from request
- Exceptions
-
- IOException - if 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
-
- connection - open connection to get
- headers - HTTP header to send with the request
- Returns
- response string from request
- Exceptions
-
- IOException - if 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
-
- connection - open connection to post to
- headers - HTTP header to send with the request
- data - data to post
- Returns
- response message from request
- Exceptions
-
- IOException - if an HTTP exception occurred
Implemented in fiftyone.pipeline.engines.services.HttpClientDefault.