File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
Sources/AWSLambdaRuntimeCore Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -26,7 +26,8 @@ internal final class HTTPClient {
26
26
27
27
private var state = State . disconnected
28
28
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 " ) ] )
30
31
31
32
init ( eventLoop: EventLoop , configuration: Lambda . Configuration . RuntimeEngine ) {
32
33
self . eventLoop = eventLoop
@@ -38,15 +39,15 @@ internal final class HTTPClient {
38
39
self . execute ( Request ( targetHost: self . targetHost,
39
40
url: url,
40
41
method: . GET,
41
- headers: headers,
42
+ headers: HTTPClient . headers,
42
43
timeout: timeout ?? self . configuration. requestTimeout) )
43
44
}
44
45
45
46
func post( url: String , body: ByteBuffer ? , timeout: TimeAmount ? = nil ) -> EventLoopFuture < Response > {
46
47
self . execute ( Request ( targetHost: self . targetHost,
47
48
url: url,
48
49
method: . POST,
49
- headers: headers,
50
+ headers: HTTPClient . headers,
50
51
body: body,
51
52
timeout: timeout ?? self . configuration. requestTimeout) )
52
53
}
You can’t perform that action at this time.
0 commit comments