@@ -33,7 +33,7 @@ public class DockerClient {
33
33
/// - Returns: Returns an `EventLoopFuture` of the expected result definied by the `Endpoint`.
34
34
internal func run< T: Endpoint > ( _ endpoint: T ) throws -> EventLoopFuture < T . Response > {
35
35
logger. info ( " Execute Endpoint: \( endpoint. path) " )
36
- return client. execute ( endpoint. method, socketPath: daemonSocket, urlPath: " /v1.40/ \( endpoint. path) " , body: endpoint. body. map { HTTPClient . Body. data ( try ! $0. encode ( ) ) } , logger: logger, headers: HTTPHeaders ( [ ( " Content-Type " , " application/json " ) ] ) )
36
+ return client. execute ( endpoint. method, socketPath: daemonSocket, urlPath: " /v1.40/ \( endpoint. path) " , body: endpoint. body. map { HTTPClient . Body. data ( try ! $0. encode ( ) ) } , logger: logger, headers: HTTPHeaders ( [ ( " Content-Type " , " application/json " ) , ( " Host " , " localhost " ) ] ) )
37
37
. logResponseBody ( logger)
38
38
. decode ( as: T . Response. self)
39
39
}
@@ -44,7 +44,7 @@ public class DockerClient {
44
44
/// - Returns: Returns an `EventLoopFuture` of the expected result definied and transformed by the `PipelineEndpoint`.
45
45
internal func run< T: PipelineEndpoint > ( _ endpoint: T ) throws -> EventLoopFuture < T . Response > {
46
46
logger. info ( " Execute PipelineEndpoint: \( endpoint. path) " )
47
- return client. execute ( endpoint. method, socketPath: daemonSocket, urlPath: " /v1.40/ \( endpoint. path) " , body: endpoint. body. map { HTTPClient . Body. data ( try ! $0. encode ( ) ) } , logger: logger, headers: HTTPHeaders ( [ ( " Content-Type " , " application/json " ) ] ) )
47
+ return client. execute ( endpoint. method, socketPath: daemonSocket, urlPath: " /v1.40/ \( endpoint. path) " , body: endpoint. body. map { HTTPClient . Body. data ( try ! $0. encode ( ) ) } , logger: logger, headers: HTTPHeaders ( [ ( " Content-Type " , " application/json " ) , ( " Host " , " localhost " ) ] ) )
48
48
. logResponseBody ( logger)
49
49
. mapString ( map: endpoint. map ( data: ) )
50
50
}
0 commit comments