mirror of
https://github.com/zed-industries/zed.git
synced 2025-01-15 14:47:30 +00:00
3419f5fc42
This PR adds a new `fetch` function to the `zed_extension_api` to allow fetching a URL through the Wasm host. Currently we only support GET requests and return the response body as a string. Release Notes: - N/A
16 lines
403 B
Text
16 lines
403 B
Text
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>;
|
|
}
|