修复参数构建 + 验证相关一系列BUG

This commit is contained in:
2025-03-31 17:17:20 +08:00
parent f14401a39f
commit 5d790ff1e7
5 changed files with 56 additions and 29 deletions

View File

@ -264,8 +264,8 @@ func (hc *HttpClient) requestBackendApi() *define.Response {
// Date : 17:44 2024/6/1
func (hc *HttpClient) newResponse() *define.Response {
return &define.Response{
Header: map[string]string{},
Cookie: map[string]string{},
Header: map[string]any{},
Cookie: map[string]any{},
Body: map[string]any{},
Code: "",
Message: "",
@ -298,7 +298,7 @@ func (hc *HttpClient) newResponse() *define.Response {
//
// Date : 21:30 2024/6/5
func (hc *HttpClient) fillResponseHeader(response *define.Response) {
response.Header = map[string]string{} // 清空已有数据
response.Header = map[string]any{} // 清空已有数据
response.HttpCode = response.RestyResponse.StatusCode() // http状态码
response.HttpCodeStatus = response.RestyResponse.Status() // http状态码描述
for headerName, headerValue := range response.RestyResponse.Header() {
@ -316,7 +316,7 @@ func (hc *HttpClient) fillResponseHeader(response *define.Response) {
//
// Date : 21:32 2024/6/5
func (hc *HttpClient) fillResponseCookie(response *define.Response) {
response.Cookie = map[string]string{} // 清空已有数据
response.Cookie = map[string]any{} // 清空已有数据
for _, cookieValue := range response.RestyResponse.Cookies() {
response.Cookie[cookieValue.Name] = cookieValue.Value
}