@@ -47,7 +47,7 @@ public final class HTTPClient<RequestContext>: Sendable where RequestContext: Se
4747 public init (
4848 urlRequestLoader: any URLRequestLoader ,
4949 interceptors: [ any HTTPClientInterceptor < RequestContext > ] = [ ] ,
50- retryPolicy: ( any RetryPolicy < ( URLRequest , RequestContext ) , Result < HTTPResponse < Data > , any Error > > ) ? = nil
50+ retryPolicy: ( any RetryPolicy < ( URLRequest , RequestContext ) , Result < HTTPResponse < Data > , any Error > > ) ? = nil ,
5151 ) {
5252 self . urlRequestLoader = urlRequestLoader
5353 self . interceptors = interceptors
@@ -90,7 +90,7 @@ public final class HTTPClient<RequestContext>: Sendable where RequestContext: Se
9090 _ urlRequest: URLRequest ,
9191 context: RequestContext ,
9292 attemptCount: Int ,
93- initialDelay: Duration
93+ initialDelay: Duration ,
9494 ) async throws -> HTTPResponse < Data > {
9595 if initialDelay != . zero {
9696 try Task . checkCancellation ( )
@@ -107,7 +107,7 @@ public final class HTTPClient<RequestContext>: Sendable where RequestContext: Se
107107 forInput: ( urlRequest, context) ,
108108 output: result,
109109 attemptCount: attemptCount,
110- previousDelay: initialDelay
110+ previousDelay: initialDelay,
111111 )
112112 else {
113113 return try result. get ( )
@@ -131,7 +131,7 @@ public final class HTTPClient<RequestContext>: Sendable where RequestContext: Se
131131 private func load(
132132 _ urlRequest: URLRequest ,
133133 context: RequestContext ,
134- interceptorIndex: Int
134+ interceptorIndex: Int ,
135135 ) async throws -> HTTPResponse < Data > {
136136 // If we’re out of interceptors, load the data
137137 guard interceptorIndex < interceptors. endIndex else {
@@ -147,7 +147,7 @@ public final class HTTPClient<RequestContext>: Sendable where RequestContext: Se
147147 // Otherwise, pass the interceptor our data and call the next one
148148 return try await interceptors [ interceptorIndex] . intercept (
149149 request: urlRequest,
150- context: context
150+ context: context,
151151 ) { ( request, context) in
152152 return try await load ( request, context: context, interceptorIndex: interceptorIndex + 1 )
153153 }
0 commit comments