mirror of
https://github.com/httprunner/httprunner.git
synced 2026-05-30 12:59:39 +08:00
refactor: post data with body
This commit is contained in:
9
step.go
9
step.go
@@ -148,13 +148,8 @@ func (s *requestWithOptionalArgs) WithCookies(cookies map[string]string) *reques
|
||||
return s
|
||||
}
|
||||
|
||||
func (s *requestWithOptionalArgs) WithData(data interface{}) *requestWithOptionalArgs {
|
||||
s.step.Request.Data = data
|
||||
return s
|
||||
}
|
||||
|
||||
func (s *requestWithOptionalArgs) WithJSON(json interface{}) *requestWithOptionalArgs {
|
||||
s.step.Request.JSON = json
|
||||
func (s *requestWithOptionalArgs) WithBody(body interface{}) *requestWithOptionalArgs {
|
||||
s.step.Request.Body = body
|
||||
return s
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user