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()
Create the most suitableHttpTransport
based on thesystem environment
.static HttpTransport
create
(DockerHost dockerHost) Create the most suitableHttpTransport
based on thesystem environment
.static HttpTransport
create
(Environment environment) Create the most suitableHttpTransport
based on the givenEnvironment
.static HttpTransport
create
(Environment environment, DockerHost dockerHost) 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 thesystem environment
.- Returns:
- a
HttpTransport
instance
-
create
Create the most suitableHttpTransport
based on thesystem environment
.- Parameters:
dockerHost
- the Docker engine host configuration- Returns:
- a
HttpTransport
instance
-
create
Create the most suitableHttpTransport
based on the givenEnvironment
.- Parameters:
environment
- the source environment- Returns:
- a
HttpTransport
instance
-
create
- Parameters:
environment
- the source environmentdockerHost
- the Docker engine host configuration- Returns:
- a
HttpTransport
instance
-