Skip to content

Commit 7a8c0f2

Browse files
authored
New async runtime client (#348)
1 parent dd059f1 commit 7a8c0f2

File tree

8 files changed

+939
-11
lines changed

8 files changed

+939
-11
lines changed

Package.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ let package = Package(
2323
.library(name: "AWSLambdaTesting", targets: ["AWSLambdaTesting"]),
2424
],
2525
dependencies: [
26-
.package(url: "https://github.com/apple/swift-nio.git", .upToNextMajor(from: "2.67.0")),
26+
.package(url: "https://github.com/apple/swift-nio.git", .upToNextMajor(from: "2.72.0")),
2727
.package(url: "https://github.com/apple/swift-log.git", .upToNextMajor(from: "1.5.4")),
2828
.package(url: "https://github.com/apple/swift-docc-plugin.git", from: "1.0.0"),
2929
.package(url: "https://github.com/apple/swift-testing.git", branch: "swift-DEVELOPMENT-SNAPSHOT-2024-08-29-a"),

Sources/AWSLambdaRuntimeCore/LambdaRuntimeClient.swift

+10-4
Original file line numberDiff line numberDiff line change
@@ -142,8 +142,14 @@ extension LambdaRuntimeClient {
142142
static let defaultHeaders = HTTPHeaders([("user-agent", "Swift-Lambda/Unknown")])
143143

144144
/// These headers must be sent along an invocation or initialization error report
145-
static let errorHeaders = HTTPHeaders([
146-
("user-agent", "Swift-Lambda/Unknown"),
147-
("lambda-runtime-function-error-type", "Unhandled"),
148-
])
145+
static let errorHeaders: HTTPHeaders = [
146+
"user-agent": "Swift-Lambda/Unknown",
147+
"lambda-runtime-function-error-type": "Unhandled",
148+
]
149+
150+
/// These headers must be sent along an invocation or initialization error report
151+
static let streamingHeaders: HTTPHeaders = [
152+
"user-agent": "Swift-Lambda/Unknown",
153+
"transfer-encoding": "streaming",
154+
]
149155
}

0 commit comments

Comments
 (0)