Interface HttpTransport
public interface HttpTransport
HTTP transport used for docker access.
- Since:
- 2.3.0
- Author:
- Phillip Webb, Scott Frederick
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic interface
An HTTP operation response. -
Method Summary
Modifier and TypeMethodDescriptionstatic HttpTransport
create
(DockerHost dockerHost) Create the most suitableHttpTransport
based on theDockerHost
.Perform an HTTP DELETE operation.Perform an HTTP GET operation.Perform an HTTP POST operation.Perform an HTTP POST operation.post
(URI uri, String contentType, IOConsumer<OutputStream> writer) Perform an HTTP POST operation.put
(URI uri, String contentType, IOConsumer<OutputStream> writer) Perform an HTTP PUT operation.
-
Method Details
-
get
Perform an HTTP GET operation.- Parameters:
uri
- the destination URI (excluding any host/port)- Returns:
- the operation response
- Throws:
IOException
- on IO error
-
post
Perform an HTTP POST operation.- Parameters:
uri
- the destination URI (excluding any host/port)- Returns:
- the operation response
- Throws:
IOException
- on IO error
-
post
Perform an HTTP POST operation.- Parameters:
uri
- the destination URI (excluding any host/port)registryAuth
- registry authentication credentials- Returns:
- the operation response
- Throws:
IOException
- on IO error
-
post
HttpTransport.Response post(URI uri, String contentType, IOConsumer<OutputStream> writer) throws IOException Perform an HTTP POST operation.- Parameters:
uri
- the destination URI (excluding any host/port)contentType
- the content type to writewriter
- a content writer- Returns:
- the operation response
- Throws:
IOException
- on IO error
-
put
HttpTransport.Response put(URI uri, String contentType, IOConsumer<OutputStream> writer) throws IOException Perform an HTTP PUT operation.- Parameters:
uri
- the destination URI (excluding any host/port)contentType
- the content type to writewriter
- a content writer- Returns:
- the operation response
- Throws:
IOException
- on IO error
-
delete
Perform an HTTP DELETE operation.- Parameters:
uri
- the destination URI (excluding any host/port)- Returns:
- the operation response
- Throws:
IOException
- on IO error
-
create
Create the most suitableHttpTransport
based on theDockerHost
.- Parameters:
dockerHost
- the Docker host information- Returns:
- a
HttpTransport
instance
-