summaryrefslogtreecommitdiff
path: root/curl.ha
diff options
context:
space:
mode:
Diffstat (limited to 'curl.ha')
-rw-r--r--curl.ha6
1 files changed, 5 insertions, 1 deletions
diff --git a/curl.ha b/curl.ha
index 1f85959..3725d56 100644
--- a/curl.ha
+++ b/curl.ha
@@ -1,5 +1,6 @@
use types::c;
use fmt;
+use os;
export type CURL = opaque;
export type CURLcode = int;
@@ -46,7 +47,10 @@ fn get(url: str) (void | curlerror) = {
};
export fn main() void = {
- match (get("https://harelang.org")) {
+ if (len(os::args) != 2) {
+ fmt::fatalf("USAGE: {} <url>", os::args[0]);
+ };
+ match (get(os::args[1])) {
case void =>
yield;
case let err: curlerror =>