update parse content type
This commit is contained in:
parent
0b2546217c
commit
0e6bd9e669
@ -69,10 +69,9 @@ func (r *Response) fillResponseBody(reqCfg *define.Request, response *define.Res
|
||||
if responseContentType == "" {
|
||||
// 返回数据未说明 Content-Type
|
||||
if response.RestyResponse.StatusCode() != http.StatusOK {
|
||||
responseContentType = "application/json"
|
||||
} else {
|
||||
return errors.New("response content type is empty")
|
||||
return nil
|
||||
}
|
||||
return errors.New("response content type is empty")
|
||||
}
|
||||
typeArr := strings.Split(strings.Split(responseContentType, ";")[0], "/")
|
||||
responseType := "json"
|
||||
|
Loading…
x
Reference in New Issue
Block a user