Interface HttpTransport
public interface HttpTransport
HTTP transport used for docker access.
- Since:
- 2.3.0
- Author:
- Phillip Webb, Scott Frederick
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interface
An HTTP operation response. -
Method Summary
Modifier and TypeMethodDescriptionstatic HttpTransport
create
(DockerConfiguration.DockerHostConfiguration dockerHost) Deprecated, for removal: This API element is subject to removal in a future version.static HttpTransport
create
(DockerConnectionConfiguration connectionConfiguration) Create the most suitableHttpTransport
based on theDockerHost
.Perform an HTTP DELETE operation.Perform an HTTP GET operation.Perform an HTTP HEAD 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
-
head
Perform an HTTP HEAD operation.- Parameters:
uri
- the destination URI (excluding any host/port)- Returns:
- the operation response
- Throws:
IOException
- on IO error
-
create
@Deprecated(since="3.5.0", forRemoval=true) static HttpTransport create(DockerConfiguration.DockerHostConfiguration dockerHost) Deprecated, for removal: This API element is subject to removal in a future version.since 3.5.0 for removal in 4.0.0 in favor ofcreate(DockerConnectionConfiguration)
Create the most suitableHttpTransport
based on theDockerHost
.- Parameters:
dockerHost
- the Docker host information- Returns:
- a
HttpTransport
instance
-
create
Create the most suitableHttpTransport
based on theDockerHost
.- Parameters:
connectionConfiguration
- the Docker host information- Returns:
- a
HttpTransport
instance
-
create(DockerConnectionConfiguration)