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