execute(_:timeout:logger:)

Execute arbitrary HTTP requests.

HTTPClient+execute.swift:63
iOS
13.0+
macOS
10.15+
tvOS
13.0+
watchOS
6.0+
func execute(_ request: HTTPClientRequest, timeout: TimeAmount, logger: Logger? = nil) async throws -> HTTPClientResponse

Parameters

request

HTTP request to execute.

timeout

time the the request has to complete.

logger

The logger to use for this request.

Returns

The response to the request. Note that the body of the response may not yet have been fully received.