zed_extension_api: Bump to v0.1.0 (#16158)

This PR changes v0.0.7 of the extension API to v0.1.0.

We had a false-start in releasing v0.0.7, which has since been yanked,
so we need a new version number. We'll publish v0.1.0 to crates.io once
the Preview build is out tomorrow.

We're incrementing the minor version so that we have some leeway in
putting out patch releases of the crate within a given extension API
release.

Release Notes:

- N/A
This commit is contained in:
Marshall Bowers 2024-08-13 10:04:34 -04:00 committed by GitHub
parent 47eed12f77
commit 98a2ab0686
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
16 changed files with 27 additions and 24 deletions

View file

@ -0,0 +1,45 @@
interface http-client {
/// An HTTP request.
record http-request {
/// The HTTP method for the request.
method: http-method,
/// The URL to which the request should be made.
url: string,
/// Headers for the request.
headers: list<tuple<string, string>>,
/// The request body.
body: option<list<u8>>,
}
/// HTTP methods.
enum http-method {
get,
post,
put,
delete,
head,
options,
patch,
}
/// An HTTP response.
record http-response {
/// The response headers.
headers: list<tuple<string, string>>,
/// The response body.
body: list<u8>,
}
/// Performs an HTTP request and returns the response.
fetch: func(req: http-request) -> result<http-response, string>;
/// An HTTP response stream.
resource http-response-stream {
/// Retrieves the next chunk of data from the response stream.
/// Returns None if the stream has ended.
next-chunk: func() -> result<option<list<u8>>, string>;
}
/// Performs an HTTP request and returns a response stream.
fetch-stream: func(req: http-request) -> result<http-response-stream, string>;
}