@@ -61,7 +61,7 @@ public class HTTPClient{
6161public func get( url: String , timeout: Timeout ? = nil ) -> EventLoopFuture < Response > {
6262do {
6363let request = try Request ( url: url, method: . GET)
64- return self . execute ( request: request)
64+ return self . execute ( request: request, timeout : timeout )
6565} catch {
6666return self . eventLoopGroup. next ( ) . makeFailedFuture ( error)
6767}
@@ -70,7 +70,7 @@ public class HTTPClient{
7070public func post( url: String , body: Body ? = nil , timeout: Timeout ? = nil ) -> EventLoopFuture < Response > {
7171do {
7272let request = try HTTPClient . Request ( url: url, method: . POST, body: body)
73- return self . execute ( request: request)
73+ return self . execute ( request: request, timeout : timeout )
7474} catch {
7575return self . eventLoopGroup. next ( ) . makeFailedFuture ( error)
7676}
@@ -79,7 +79,7 @@ public class HTTPClient{
7979public func patch( url: String , body: Body ? = nil , timeout: Timeout ? = nil ) -> EventLoopFuture < Response > {
8080do {
8181let request = try HTTPClient . Request ( url: url, method: . PATCH, body: body)
82- return self . execute ( request: request)
82+ return self . execute ( request: request, timeout : timeout )
8383} catch {
8484return self . eventLoopGroup. next ( ) . makeFailedFuture ( error)
8585}
@@ -88,7 +88,7 @@ public class HTTPClient{
8888public func put( url: String , body: Body ? = nil , timeout: Timeout ? = nil ) -> EventLoopFuture < Response > {
8989do {
9090let request = try HTTPClient . Request ( url: url, method: . PUT, body: body)
91- return self . execute ( request: request)
91+ return self . execute ( request: request, timeout : timeout )
9292} catch {
9393return self . eventLoopGroup. next ( ) . makeFailedFuture ( error)
9494}
@@ -97,7 +97,7 @@ public class HTTPClient{
9797public func delete( url: String , timeout: Timeout ? = nil ) -> EventLoopFuture < Response > {
9898do {
9999let request = try Request ( url: url, method: . DELETE)
100- return self . execute ( request: request)
100+ return self . execute ( request: request, timeout : timeout )
101101} catch {
102102return self . eventLoopGroup. next ( ) . makeFailedFuture ( error)
103103}
@@ -201,7 +201,7 @@ public class HTTPClient{
201201case shared( EventLoopGroup )
202202case createNew
203203}
204-
204+
205205public struct Timeout {
206206public var connect : TimeAmount ?
207207public var read : TimeAmount ?
0 commit comments