File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed
Sources/AWSLambdaRuntimeCore Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -27,6 +27,8 @@ internal final class HTTPClient {
2727 private var state = State . disconnected
2828 private var executing = false
2929
30+ private static let headers = HTTPHeaders ( [ ( " user-agent " , " Swift-Lambda/Unknown " ) ] )
31+
3032 init ( eventLoop: EventLoop , configuration: Lambda . Configuration . RuntimeEngine ) {
3133 self . eventLoop = eventLoop
3234 self . configuration = configuration
@@ -37,13 +39,15 @@ internal final class HTTPClient {
3739 self . execute ( Request ( targetHost: self . targetHost,
3840 url: url,
3941 method: . GET,
42+ headers: HTTPClient . headers,
4043 timeout: timeout ?? self . configuration. requestTimeout) )
4144 }
4245
4346 func post( url: String , body: ByteBuffer ? , timeout: TimeAmount ? = nil ) -> EventLoopFuture < Response > {
4447 self . execute ( Request ( targetHost: self . targetHost,
4548 url: url,
4649 method: . POST,
50+ headers: HTTPClient . headers,
4751 body: body,
4852 timeout: timeout ?? self . configuration. requestTimeout) )
4953 }
You can’t perform that action at this time.
0 commit comments