feat: support indicating type and filename when uploading file

This commit is contained in:
buyuxiang
2022-07-11 20:44:20 +08:00
parent 2f2ef937f4
commit a76b3b399d
5 changed files with 159 additions and 34 deletions

View File

@@ -247,7 +247,7 @@ func (r *requestBuilder) prepareBody(stepVariables map[string]interface{}) error
dataBytes = vv
case bytes.Buffer:
dataBytes = vv.Bytes()
case *builtin.TFormWriter:
case *builtin.TFormDataWriter:
dataBytes = vv.Payload.Bytes()
default: // unexpected body type
return errors.New("unexpected request body type")