2023-02-09 19:54:21 +00:00
|
|
|
use net::http;
|
|
|
|
use net::ip;
|
|
|
|
use net::uri;
|
|
|
|
use os;
|
|
|
|
|
|
|
|
export fn main() void = {
|
2023-02-09 22:23:05 +00:00
|
|
|
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 = "/",
|
2023-02-09 19:54:21 +00:00
|
|
|
...
|
2023-02-09 22:23:05 +00:00
|
|
|
});
|
2023-02-09 19:54:21 +00:00
|
|
|
http::write_header(os::stdout, &req.header)!;
|
|
|
|
};
|