1
Fork 0
hare-http/cmd/http/main.ha
2023-02-09 23:23:05 +01:00

18 lines
329 B
Hare

use net::http;
use net::ip;
use net::uri;
use os;
export fn main() void = {
const client = http::newclient("Hare test client");
defer http::client_finish(&client);
const req = http::get(&client, &uri::uri {
scheme = "http",
host = ip::LOCAL_V6,
path = "/",
...
});
http::write_header(os::stdout, &req.header)!;
};