MCPcopy
hub / github.com/httprunner/httprunner / WithUpload

Method WithUpload

hrp/step_request.go:837–842  ·  view source on GitHub ↗

WithUpload sets HTTP request body for uploading file(s).

(upload map[string]interface{})

Source from the content-addressed store, hash-verified

835
836// WithUpload sets HTTP request body for uploading file(s).
837func (s *StepRequestWithOptionalArgs) WithUpload(upload map[string]interface{}) *StepRequestWithOptionalArgs {
838 // init upload
839 initUpload(s.step)
840 s.step.Request.Upload = upload
841 return s
842}
843
844// TeardownHook adds a teardown hook for current teststep.
845func (s *StepRequestWithOptionalArgs) TeardownHook(hook string) *StepRequestWithOptionalArgs {

Callers 1

TestCaseUploadFileFunction · 0.80

Calls 1

initUploadFunction · 0.85

Tested by 1

TestCaseUploadFileFunction · 0.64