mirror of
https://github.com/zed-industries/zed.git
synced 2025-01-17 23:56:55 +00:00
17 lines
403 B
Text
17 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>;
|
||
|
}
|