mirror of
https://github.com/httprunner/httprunner.git
synced 2026-07-07 07:21:23 +08:00
fix: custom content-type prior to default
This commit is contained in:
@@ -678,7 +678,9 @@ func (r *caseRunner) runStepRequest(step *TStep) (stepResult *stepData, err erro
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return stepResult, err
|
return stepResult, err
|
||||||
}
|
}
|
||||||
req.Header.Set("Content-Type", "application/json; charset=UTF-8")
|
if req.Header.Get("Content-Type") == "" {
|
||||||
|
req.Header.Set("Content-Type", "application/json; charset=utf-8")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
case string:
|
case string:
|
||||||
dataBytes = []byte(vv)
|
dataBytes = []byte(vv)
|
||||||
|
|||||||
Reference in New Issue
Block a user