zed/crates/extension_api/wit/since_v0.0.7/http-client.wit

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

17 lines
403 B
Text
Raw Normal View History

interface http-client {
/// An HTTP request.
record http-request {
/// The URL to which the request should be made.
url: string,
}
/// An HTTP response.
record http-response {
/// The response body.
body: string,
}
/// Performs an HTTP request and returns the response.
fetch: func(req: http-request) -> result<http-response, string>;
}