diff --git a/Package.swift b/Package.swift index 95bf39a..c024088 100644 --- a/Package.swift +++ b/Package.swift @@ -16,6 +16,7 @@ let package = Package( ], dependencies: [ .package(url: "https://github.com/swift-server/async-http-client.git", from: "1.0.0"), + .package(url: "https://github.com/apple/swift-nio.git", from: "2.33.0"), ], targets: [ // Targets are the basic building blocks of a package. A target can define a module or a test suite. @@ -24,6 +25,9 @@ let package = Package( name: "ElasticsearchNIOClient", dependencies: [ .product(name: "AsyncHTTPClient", package: "async-http-client"), + .product(name: "NIOCore", package: "swift-nio"), + .product(name: "NIOHTTP1", package: "swift-nio"), + .product(name: "NIOFoundationCompat", package: "swift-nio"), ]), .testTarget( name: "ElasticsearchNIOClientTests", diff --git a/Sources/ElasticsearchNIOClient/ElasticsearchClient+Requests.swift b/Sources/ElasticsearchNIOClient/ElasticsearchClient+Requests.swift index e2e2dba..4734016 100644 --- a/Sources/ElasticsearchNIOClient/ElasticsearchClient+Requests.swift +++ b/Sources/ElasticsearchNIOClient/ElasticsearchClient+Requests.swift @@ -1,6 +1,7 @@ import Foundation import NIO import NIOHTTP1 +import NIOFoundationCompat extension ElasticsearchClient { public func get(id: String, from indexName: String) -> EventLoopFuture> { diff --git a/Sources/ElasticsearchNIOClient/ElasticsearchClient.swift b/Sources/ElasticsearchNIOClient/ElasticsearchClient.swift index b3fa321..ce2e689 100644 --- a/Sources/ElasticsearchNIOClient/ElasticsearchClient.swift +++ b/Sources/ElasticsearchNIOClient/ElasticsearchClient.swift @@ -1,4 +1,5 @@ import NIO +import NIOFoundationCompat import AsyncHTTPClient import Foundation import Logging