static func withHTTPClient<Return>(eventLoopGroup: any EventLoopGroup = HTTPClient.defaultEventLoopGroup, configuration: Configuration = Configuration(), backgroundActivityLogger: Logger? = nil, isolation: isolated (any Actor)? = #isolation, _ body: (HTTPClient) async throws -> Return) async throws -> Return
Start & automatically shut down a new HTTPClient
.
func execute(_ method: HTTPMethod = .GET, secureSocketPath: String, urlPath: String, body: Body? = nil, deadline: NIODeadline? = nil, logger: Logger? = nil) -> EventLoopFuture<Response>
Execute arbitrary HTTPS+UNIX request to a unix domain socket path over TLS, using the specified URL as the request to send to the server.
func execute(_ method: HTTPMethod = .GET, socketPath: String, urlPath: String, body: Body? = nil, deadline: NIODeadline? = nil, logger: Logger? = nil) -> EventLoopFuture<Response>
Execute arbitrary HTTP+UNIX request to a unix domain socket path, using the specified URL as the request to send to the server.
func execute(_ method: HTTPMethod = .GET, url: String, body: Body? = nil, deadline: NIODeadline? = nil, logger: Logger? = nil) -> EventLoopFuture<Response>
Execute arbitrary HTTP request using specified URL.
func execute<Delegate>(request: Request, delegate: Delegate, eventLoop eventLoopPreference: EventLoopPreference, deadline: NIODeadline? = nil, logger: Logger?) -> Task<Delegate.Response> where Delegate : HTTPClientResponseDelegate
Execute arbitrary HTTP request and handle response processing using provided delegate.