Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit

Permalink
small fix
Browse files Browse the repository at this point in the history
  • Loading branch information
gabriel-schneider-vtex committed Mar 3, 2023
1 parent fdfb13b commit b1b6327
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 5 additions & 4 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,11 +89,12 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {

//let resp = reqwest::blocking::get(nurl)?;
//let resp = reqwest::blocking::Client::new().get(nurl).send()?;
let client = reqwest::blocking::Client::new();
let resp = match args.verb {
Verb::GET => client.get(nurl),
Verb::POST => client.post(nurl),
Verb::HEAD => client.head(nurl),
Verb::GET => reqwest::blocking::Client::new().get(nurl),
Verb::POST => {
reqwest::blocking::Client::new().post(nurl)
},
Verb::HEAD => reqwest::blocking::Client::new().head(nurl),
_ => panic!("Verb {:?} not implemented", args.verb),
}
.body(args.data.unwrap_or("".into()))
Expand Down

0 comments on commit b1b6327

Please sign in to comment.