Skip to content

Commit ac309b1

Browse files
committed
make it static
1 parent dd7fd7d commit ac309b1

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

Sources/AWSLambdaRuntimeCore/HTTPClient.swift

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ internal final class HTTPClient {
2626

2727
private var state = State.disconnected
2828
private var executing = false
29-
private let headers = HTTPHeaders([("User-Agent", "Swift-Lambda/Unknown")])
29+
30+
private static let headers = HTTPHeaders([("user-agent", "Swift-Lambda/Unknown")])
3031

3132
init(eventLoop: EventLoop, configuration: Lambda.Configuration.RuntimeEngine) {
3233
self.eventLoop = eventLoop
@@ -38,15 +39,15 @@ internal final class HTTPClient {
3839
self.execute(Request(targetHost: self.targetHost,
3940
url: url,
4041
method: .GET,
41-
headers: headers,
42+
headers: HTTPClient.headers,
4243
timeout: timeout ?? self.configuration.requestTimeout))
4344
}
4445

4546
func post(url: String, body: ByteBuffer?, timeout: TimeAmount? = nil) -> EventLoopFuture<Response> {
4647
self.execute(Request(targetHost: self.targetHost,
4748
url: url,
4849
method: .POST,
49-
headers: headers,
50+
headers: HTTPClient.headers,
5051
body: body,
5152
timeout: timeout ?? self.configuration.requestTimeout))
5253
}

0 commit comments

Comments
 (0)