diff --git a/h3i/src/prompts/h3/headers.rs b/h3i/src/prompts/h3/headers.rs index 0ad71fe3a2..bcabd714a1 100644 --- a/h3i/src/prompts/h3/headers.rs +++ b/h3i/src/prompts/h3/headers.rs @@ -117,6 +117,7 @@ pub fn prompt_push_promise() -> InquireResult { fn pseudo_headers(host_port: &str) -> InquireResult> { let method = Text::new("method:") .with_autocomplete(&method_suggester) + .with_default("GET") .with_help_message(ESC_TO_RET) .prompt()?; @@ -126,10 +127,10 @@ fn pseudo_headers(host_port: &str) -> InquireResult> { .with_help_message(&help) .prompt()?; - let path = Text::new("path:").prompt()?; + let path = Text::new("path:").with_default("/").prompt()?; let scheme = Text::new("scheme:") - .with_autocomplete(&scheme_suggester) + .with_default("https") .with_help_message(ESC_TO_RET) .prompt()?; @@ -170,12 +171,6 @@ fn method_suggester(val: &str) -> SuggestionResult> { squish_suggester(&suggestions, val) } -fn scheme_suggester(val: &str) -> SuggestionResult> { - let suggestions = ["https"]; - - squish_suggester(&suggestions, val) -} - fn validate_stream_id(id: &str) -> SuggestionResult { if id.is_empty() { return Ok(Validation::Valid);