MCPcopy
hub / github.com/httprunner/httprunner / WithBody

Method WithBody

hrp/step_request.go:831–834  ·  view source on GitHub ↗

WithBody sets HTTP request body for current step.

(body interface{})

Source from the content-addressed store, hash-verified

829
830// WithBody sets HTTP request body for current step.
831func (s *StepRequestWithOptionalArgs) WithBody(body interface{}) *StepRequestWithOptionalArgs {
832 s.step.Request.Body = body
833 return s
834}
835
836// WithUpload sets HTTP request body for uploading file(s).
837func (s *StepRequestWithOptionalArgs) WithUpload(upload map[string]interface{}) *StepRequestWithOptionalArgs {

Callers 9

testcase_test.goFile · 0.80
TestHTTPProtocolFunction · 0.80
TestCaseParseVariablesFunction · 0.80
TestRendezvousFunction · 0.80
TestCaseBasicRequestFunction · 0.80
TestCaseUploadFileFunction · 0.80
TestCaseCallFunctionFunction · 0.80

Calls

no outgoing calls

Tested by 7

TestHTTPProtocolFunction · 0.64
TestCaseParseVariablesFunction · 0.64
TestRendezvousFunction · 0.64
TestCaseBasicRequestFunction · 0.64
TestCaseUploadFileFunction · 0.64
TestCaseCallFunctionFunction · 0.64