@@ -176,11 +176,11 @@ public class HTTPClient {
176
176
///
177
177
/// - parameters:
178
178
/// - request: HTTP request to execute.
179
- /// - eventLoop: NIO Event Loop preferrence .
179
+ /// - eventLoop: NIO Event Loop preference .
180
180
/// - deadline: Point in time by which the request must complete.
181
- public func execute( request: Request , eventLoopPreferrence : EventLoop , deadline: NIODeadline ? = nil ) -> EventLoopFuture < Response > {
181
+ public func execute( request: Request , eventLoop : EventLoopPreference , deadline: NIODeadline ? = nil ) -> EventLoopFuture < Response > {
182
182
let accumulator = ResponseAccumulator ( request: request)
183
- return self . execute ( request: request, delegate: accumulator, eventLoop: eventLoopPreferrence , deadline: deadline) . futureResult
183
+ return self . execute ( request: request, delegate: accumulator, eventLoop: eventLoop , deadline: deadline) . futureResult
184
184
}
185
185
186
186
/// Execute arbitrary HTTP request and handle response processing using provided delegate.
@@ -199,10 +199,10 @@ public class HTTPClient {
199
199
/// - parameters:
200
200
/// - request: HTTP request to execute.
201
201
/// - delegate: Delegate to process response parts.
202
- /// - eventLoop: NIO Event Loop preferrence .
202
+ /// - eventLoop: NIO Event Loop preference .
203
203
/// - deadline: Point in time by which the request must complete.
204
- public func execute< T: HTTPClientResponseDelegate > ( request: Request , delegate: T , eventLoop: EventLoopPreferrence , deadline: NIODeadline ? = nil ) -> Task < T . Response > {
205
- switch eventLoop. preferrence {
204
+ public func execute< T: HTTPClientResponseDelegate > ( request: Request , delegate: T , eventLoop: EventLoopPreference , deadline: NIODeadline ? = nil ) -> Task < T . Response > {
205
+ switch eventLoop. preference {
206
206
case . indifferent:
207
207
return self . execute ( request: request, delegate: delegate, eventLoop: self . eventLoopGroup. next ( ) , deadline: deadline)
208
208
case . prefers( let preferred) :
@@ -343,20 +343,20 @@ public class HTTPClient {
343
343
}
344
344
345
345
/// Specifies how the library will treat event loop passed by the user.
346
- public struct EventLoopPreferrence {
347
- enum Preferrence {
346
+ public struct EventLoopPreference {
347
+ enum Preference {
348
348
/// Event Loop will be selected by the library.
349
349
case indifferent
350
350
/// Library will try to use provided event loop if possible.
351
351
case prefers( EventLoop )
352
352
}
353
353
354
- var preferrence : Preferrence
354
+ var preference : Preference
355
355
356
356
/// Event Loop will be selected by the library.
357
- public static let indifferent = EventLoopPreferrence ( preferrence : . indifferent)
357
+ public static let indifferent = EventLoopPreference ( preference : . indifferent)
358
358
/// Library will try to use provided event loop if possible.
359
- public static func prefers( _ eventLoop: EventLoop ) -> EventLoopPreferrence { EventLoopPreferrence ( preferrence : . prefers( eventLoop) ) }
359
+ public static func prefers( _ eventLoop: EventLoop ) -> EventLoopPreference { EventLoopPreference ( preference : . prefers( eventLoop) ) }
360
360
}
361
361
362
362
/// Timeout configuration
0 commit comments