optimization code

This commit is contained in:
huangsimin 2018-11-21 15:43:52 +08:00
parent 1d2bbcd22f
commit c4a12f9314

View File

@ -194,11 +194,10 @@ func (wf *Workflow) SetBody(params ...interface{}) *Workflow {
if plen >= 2 { if plen >= 2 {
t := params[plen-1] t := params[plen-1]
defaultContentType = t.(string) defaultContentType = t.(string)
wf.Body.SetPrefix(defaultContentType)
} else {
wf.Body.SetPrefix(defaultContentType)
} }
wf.Body.SetPrefix(defaultContentType)
if defaultContentType == TypeFormData { if defaultContentType == TypeFormData {
createMultipart(wf.Body, params) createMultipart(wf.Body, params)
} else { } else {