fix: post form data

This commit is contained in:
debugtalk
2021-10-30 16:11:39 +08:00
parent 8c5da086cf
commit 2e8c40a1e0
3 changed files with 21 additions and 8 deletions

View File

@@ -83,7 +83,7 @@ func TestCaseDemo(t *testing.T) {
hrp.Step("post form data").
POST("/post").
WithHeaders(map[string]string{"Content-Type": "application/x-www-form-urlencoded; charset=UTF-8"}).
WithParams(map[string]interface{}{
WithBody(map[string]interface{}{
"foo1": "$varFoo1", // reference former extracted variable
"foo2": "${max($a, $b)}", // 12.3; step level variables are independent, variable b is 3.45 here
}).