支持解析返回结果

This commit is contained in:
白茶清欢 2022-06-30 21:32:35 +08:00
parent f44b90c10b
commit 473367da9f

2
rpc.go
View File

@ -252,7 +252,7 @@ func (r *request) Send(ctx *gin.Context, serviceFlag string, apiFlag string, par
if !r.codeIsSuccess(code, apiConfig.SuccessCodeList) {
return fmt.Errorf("业务状态码异常 : %v -> %v", code, message)
}
return nil
return parseResponseBody([]byte(data), response.Header.Get("Content-type"))
}
// GetHttpClient 获取client实例