cleanup, docs
This commit is contained in:
@@ -12,4 +12,7 @@ Returns `{ status, headers, body, error }`. `headers` is a name/value map. A mis
|
||||
>socket
|
||||
|
||||
:example
|
||||
print("http_request is resource-bound; configure the service or connection, then call it in request code.\n");
|
||||
DValue req; req["method"] = "GET"; req["url"] = "http://127.0.0.1/doc/index.uce";
|
||||
req["headers"]["Host"] = "uce.openfu.com"; req["timeout_ms"] = (f64)2000;
|
||||
DValue resp = http_request(req);
|
||||
print("HTTP ", resp["status"].to_u64(), ", ", resp["body"].to_string().length(), " bytes returned\n");
|
||||
|
||||
Reference in New Issue
Block a user