struct
struct HttpClientRequest
A request being assembled — mutable holder; not the same shape as the server-side HttpRequest (which is parsed-from-wire).
defined in C:\Users\bye45\.glide\bin/src/stdlib/http/client.glide
A request being assembled — mutable holder; not the same shape as
A request being assembled — mutable holder; not the same shape as the server-side HttpRequest (which is parsed-from-wire).
Persistent client config. Keep one around to share defaults across many requests; for one-shot calls use the http_get / http_post* free functions which build a default client per call.
One-shot GET with a default client. For multiple calls or shared state (cookies, timeouts), use HttpClient::new() once and reuse.
let r: !*HttpResponse = http_get("https://example.com/");
if r.ok && r.val.status == 200 { println!(r.val.body.len(), "bytes"); }
One-shot JSON POST with a default client.
let r: !*HttpResponse = http_post_json("https://api/login",
"{\"user\":\"a\",\"pass\":\"b\"}");