interface http-client {
    use http-types.{http-request, http-response, http-error};

    // A HTTP client.
    resource http-client {
        // Executes a request and returns the response, yielding the current future until finished.
        execute: static func(request: http-request) -> result<http-response, http-error>;
        // Executes multiple requests in parallel, yielding the current future until all requests are done.
        execute-many: static func(requests: list<http-request>) -> list<result<http-response, http-error>>;
    }
}
