设置请求header与请求url

This commit is contained in:
2024-05-31 18:37:35 +08:00
parent a0adefcc0c
commit 0ba0f7dced
2 changed files with 8 additions and 2 deletions

View File

@ -89,5 +89,8 @@ func (hc *HttpClient) GetRestyClient() *resty.Client {
//
// Date : 15:52 2024/5/31
func (hc *HttpClient) Request(reqConfig *define.Request) *define.Response {
hc.Client.OnBeforeRequest(hc.getRequestValidateMiddleware()) // 请求参数验证中间件必注册
hc.Client.OnAfterResponse(hc.getResponseValidateMiddleware()) // 响应验证中间件必注册
hc.request.Send()
return nil
}