net::http::do: assert http
Until we implement TLS
This commit is contained in:
parent
26b21689b5
commit
8ccb846c55
|
@ -22,6 +22,7 @@ export fn do(client: *client, req: *request) (response | error) = {
|
|||
};
|
||||
defer free(ctx.buf);
|
||||
|
||||
assert(req.target.scheme == "http"); // TODO: https
|
||||
const conn = dial::dial_uri("tcp", req.target)?;
|
||||
ctx.file = bufio::buffered(conn, [], ctx.buf);
|
||||
bufio::setflush(&ctx.file, []);
|
||||
|
|
Loading…
Reference in a new issue