feat: add search terms to network (#5602)

Co-authored-by: Leyoh Li <leyohli@LeyohdeMacBook-Air.local>
This commit is contained in:
Yiheng Li 2022-05-21 11:19:17 +08:00 committed by GitHub
parent 7c63ce15d8
commit e9d8b19d4d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 28 additions and 0 deletions

View file

@ -75,6 +75,10 @@ impl Command for SubCommand {
"Performs HTTP GET operation."
}
fn search_terms(&self) -> Vec<&str> {
vec!["network", "fetch", "get", "pull", "request", "http"]
}
fn run(
&self,
engine_state: &EngineState,

View file

@ -79,6 +79,10 @@ impl Command for SubCommand {
"Performs HTTP POST operation."
}
fn search_terms(&self) -> Vec<&str> {
vec!["network", "post", "send", "push", "http"]
}
fn run(
&self,
engine_state: &EngineState,

View file

@ -25,6 +25,10 @@ impl Command for SubCommand {
"Get the host of a URL"
}
fn search_terms(&self) -> Vec<&str> {
vec!["url", "host", "hostname"]
}
fn run(
&self,
engine_state: &EngineState,

View file

@ -25,6 +25,10 @@ impl Command for SubCommand {
"Get the path of a URL"
}
fn search_terms(&self) -> Vec<&str> {
vec!["url", "path"]
}
fn run(
&self,
engine_state: &EngineState,

View file

@ -25,6 +25,10 @@ impl Command for SubCommand {
"Get the query string of a URL"
}
fn search_terms(&self) -> Vec<&str> {
vec!["url", "query", "parameter"]
}
fn run(
&self,
engine_state: &EngineState,

View file

@ -25,6 +25,10 @@ impl Command for SubCommand {
"Get the scheme (e.g. http, file) of a URL"
}
fn search_terms(&self) -> Vec<&str> {
vec!["url", "scheme", "protocol"]
}
fn run(
&self,
engine_state: &EngineState,

View file

@ -21,6 +21,10 @@ impl Command for Url {
"Apply url function."
}
fn search_terms(&self) -> Vec<&str> {
vec!["url", "network", "parse"]
}
fn run(
&self,
engine_state: &EngineState,