Skip to content

Commit

Permalink
Fix parameter discovering in json body
Browse files Browse the repository at this point in the history
  • Loading branch information
Sh1Yo committed Jul 11, 2021
1 parent e2c0f7c commit 497a217
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "x8"
version = "2.3.3"
version = "2.3.4"
authors = ["Alexander Mironov <[email protected]>"]
edition = "2018"
license = "GPL-3.0-or-later"
Expand Down
8 changes: 3 additions & 5 deletions src/args.rs
Original file line number Diff line number Diff line change
Expand Up @@ -416,13 +416,11 @@ pub fn get_config() -> (Config, usize) {
}

if parameter_template.is_empty() {
if body_type.contains("json") && args.is_present("as_body") {
if body_type.contains("json") && args.is_present("as-body") {
parameter_template = "\"%k\":\"%v\", ";
} else if body_type.contains("urlencode") {
parameter_template = "%k=%v&";
} /*else {
} else {
parameter_template = "%k=%v&";
}*/
}
}


Expand Down

0 comments on commit 497a217

Please sign in to comment.