gpui-component/crates/story/examples/fixtures/test.nv
Jason Lee c3ec1deb97
code-editor: Update CodeEditor to support external language. (#928)
Add [Navi](https://navi-lang.org) language for example to external
language for CodeEditor.

<img width="864" alt="image"
src="https://github.com/user-attachments/assets/73afa56d-31bd-4867-a9f2-0a8cf790af0f"
/>
2025-06-09 14:27:33 +08:00

18 lines
433 B
Text

use std.net.http.client.{HttpClient, Request};
use std.net.http.OK;
fn main() throws {
let client = HttpClient.new(
max_redirect_count: 5,
user_agent: "navi-client",
);
let req = try Request.get("https://httpbin.org/get");
let res = try client.request(req);
if (res.status() != OK) {
try println("Failed to fetch repo", res.text());
return;
}
try println(res.text());
}