diff --git a/crates/nu-command/src/network/http/get.rs b/crates/nu-command/src/network/http/get.rs index 7f040d171..9ed306850 100644 --- a/crates/nu-command/src/network/http/get.rs +++ b/crates/nu-command/src/network/http/get.rs @@ -140,7 +140,7 @@ struct Arguments { content_type: Option, content_length: Option, raw: bool, - insecure: Option, + insecure: bool, user: Option, password: Option, timeout: Option, @@ -159,10 +159,10 @@ fn run_get( content_type: call.get_flag(engine_state, stack, "content-type")?, content_length: call.get_flag(engine_state, stack, "content-length")?, raw: call.has_flag("raw"), - insecure: call.get_flag(engine_state, stack, "insecure")?, + insecure: call.has_flag("insecure"), user: call.get_flag(engine_state, stack, "user")?, password: call.get_flag(engine_state, stack, "password")?, - timeout: call.get_flag(engine_state, stack, "timeout")?, + timeout: call.get_flag(engine_state, stack, "max-time")?, }; helper(engine_state, stack, call, args) } @@ -178,7 +178,7 @@ fn helper( let span = args.url.span()?; let (requested_url, url) = http_parse_url(call, span, args.url)?; - let client = http_client(args.insecure.is_some()); + let client = http_client(args.insecure); let mut request = client.get(url); if let Some(data) = args.data {