完成client的构建
This commit is contained in:
@ -38,6 +38,15 @@ type requestConfig struct {
|
||||
//
|
||||
// Date : 16:25 2024/5/31
|
||||
func (rc *requestConfig) initDefaultConfig(reqConfig *define.Request) {
|
||||
if nil == reqConfig.Header {
|
||||
reqConfig.Header = map[string]string{}
|
||||
}
|
||||
if len(reqConfig.ContentType) > 0 {
|
||||
reqConfig.Header["Content-Type"] = reqConfig.ContentType
|
||||
}
|
||||
if nil == reqConfig.Cookie {
|
||||
reqConfig.Cookie = map[string]string{}
|
||||
}
|
||||
if reqConfig.ConnectTimeout <= 0 {
|
||||
reqConfig.ConnectTimeout = define.DefaultConnectTimeout
|
||||
}
|
||||
|
Reference in New Issue
Block a user