feat: support indicating type and filename when uploading file

This commit is contained in:
buyuxiang
2022-07-11 20:44:20 +08:00
parent 79fe603a06
commit 6f1337f309
5 changed files with 159 additions and 34 deletions
+1 -1
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")