Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New runtime client #348

Merged
merged 16 commits into from
Sep 4, 2024
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ let package = Package(
.library(name: "AWSLambdaTesting", targets: ["AWSLambdaTesting"]),
],
dependencies: [
.package(url: "https://github.com/apple/swift-nio.git", .upToNextMajor(from: "2.67.0")),
.package(url: "https://github.com/apple/swift-nio.git", .upToNextMajor(from: "2.72.0")),
.package(url: "https://github.com/apple/swift-log.git", .upToNextMajor(from: "1.5.4")),
.package(url: "https://github.com/apple/swift-docc-plugin.git", from: "1.0.0"),
.package(url: "https://github.com/apple/swift-testing.git", branch: "swift-DEVELOPMENT-SNAPSHOT-2024-08-29-a"),
Expand Down
14 changes: 10 additions & 4 deletions Sources/AWSLambdaRuntimeCore/LambdaRuntimeClient.swift
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,14 @@ extension LambdaRuntimeClient {
static let defaultHeaders = HTTPHeaders([("user-agent", "Swift-Lambda/Unknown")])

/// These headers must be sent along an invocation or initialization error report
static let errorHeaders = HTTPHeaders([
("user-agent", "Swift-Lambda/Unknown"),
("lambda-runtime-function-error-type", "Unhandled"),
])
static let errorHeaders: HTTPHeaders = [
"user-agent": "Swift-Lambda/Unknown",
"lambda-runtime-function-error-type": "Unhandled",
]

/// These headers must be sent along an invocation or initialization error report
static let streamingHeaders: HTTPHeaders = [
"user-agent": "Swift-Lambda/Unknown",
"transfer-encoding": "streaming",
]
}
Loading
Loading