Protocol
Client
public protocol Client
Default Implementations
logging(to:)
public func logging(to logger: Logger) -> Client
allocating(to:)
public func allocating(to byteBufferAllocator: ByteBufferAllocator) -> Client
byteBufferAllocator
public var byteBufferAllocator: ByteBufferAllocator
get(_:headers:beforeSend:)
public func get(_ url: URI, headers: HTTPHeaders = [:], beforeSend: (inout ClientRequest) throws -> () = { _ in }) -> EventLoopFuture<ClientResponse>
post(_:headers:beforeSend:)
public func post(_ url: URI, headers: HTTPHeaders = [:], beforeSend: (inout ClientRequest) throws -> () = { _ in }) -> EventLoopFuture<ClientResponse>
patch(_:headers:beforeSend:)
public func patch(_ url: URI, headers: HTTPHeaders = [:], beforeSend: (inout ClientRequest) throws -> () = { _ in }) -> EventLoopFuture<ClientResponse>
put(_:headers:beforeSend:)
public func put(_ url: URI, headers: HTTPHeaders = [:], beforeSend: (inout ClientRequest) throws -> () = { _ in }) -> EventLoopFuture<ClientResponse>
delete(_:headers:beforeSend:)
public func delete(_ url: URI, headers: HTTPHeaders = [:], beforeSend: (inout ClientRequest) throws -> () = { _ in }) -> EventLoopFuture<ClientResponse>
post(_:headers:content:)
public func post<T>(_ url: URI, headers: HTTPHeaders = [:], content: T) -> EventLoopFuture<ClientResponse> where T: Content
patch(_:headers:content:)
public func patch<T>(_ url: URI, headers: HTTPHeaders = [:], content: T) -> EventLoopFuture<ClientResponse> where T: Content
put(_:headers:content:)
public func put<T>(_ url: URI, headers: HTTPHeaders = [:], content: T) -> EventLoopFuture<ClientResponse> where T: Content
send(_:headers:to:beforeSend:)
public func send(
_ method: HTTPMethod,
headers: HTTPHeaders = [:],
to url: URI,
beforeSend: (inout ClientRequest) throws -> () = { _ in }
) -> EventLoopFuture<ClientResponse>
get(_:headers:beforeSend:)
public func get(_ url: URI, headers: HTTPHeaders = [:], beforeSend: (inout ClientRequest) throws -> () = { _ in }) async throws -> ClientResponse
post(_:headers:beforeSend:)
public func post(_ url: URI, headers: HTTPHeaders = [:], beforeSend: (inout ClientRequest) throws -> () = { _ in }) async throws -> ClientResponse
patch(_:headers:beforeSend:)
public func patch(_ url: URI, headers: HTTPHeaders = [:], beforeSend: (inout ClientRequest) throws -> () = { _ in }) async throws -> ClientResponse
put(_:headers:beforeSend:)
public func put(_ url: URI, headers: HTTPHeaders = [:], beforeSend: (inout ClientRequest) throws -> () = { _ in }) async throws -> ClientResponse
delete(_:headers:beforeSend:)
public func delete(_ url: URI, headers: HTTPHeaders = [:], beforeSend: (inout ClientRequest) throws -> () = { _ in }) async throws -> ClientResponse
post(_:headers:content:)
public func post<T>(_ url: URI, headers: HTTPHeaders = [:], content: T) async throws -> ClientResponse where T: Content
patch(_:headers:content:)
public func patch<T>(_ url: URI, headers: HTTPHeaders = [:], content: T) async throws -> ClientResponse where T: Content
put(_:headers:content:)
public func put<T>(_ url: URI, headers: HTTPHeaders = [:], content: T) async throws -> ClientResponse where T: Content
send(_:headers:to:beforeSend:)
public func send(
_ method: HTTPMethod,
headers: HTTPHeaders = [:],
to url: URI,
beforeSend: (inout ClientRequest) throws -> () = { _ in }
) async throws -> ClientResponse
send(_:)
public func send(_ request: ClientRequest) async throws -> ClientResponse
Requirements
eventLoop
var eventLoop: EventLoop
byteBufferAllocator
var byteBufferAllocator: ByteBufferAllocator
delegating(to:)
func delegating(to eventLoop: EventLoop) -> Client
logging(to:)
func logging(to logger: Logger) -> Client
allocating(to:)
func allocating(to byteBufferAllocator: ByteBufferAllocator) -> Client
send(_:)
func send(_ request: ClientRequest) -> EventLoopFuture<ClientResponse>