Skip to content

Commit 93880d6

Browse files
committed
feat: 默认RequestSetting使其生效
1 parent 77eac63 commit 93880d6

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

options.go

+1-3
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ func NewOptions[Request any, Response any](targetUrl string, responseHandler Res
1919
TargetURL: targetUrl,
2020
Method: DefaultMethod,
2121
Body: []byte{},
22-
RequestSettingSlice: nil,
22+
RequestSettingSlice: []RequestSetting{DefaultRequestSetting()},
2323
ResponseHandler: responseHandler,
2424
}
2525
}
@@ -71,5 +71,3 @@ func (x *Options[Request, Response]) WithJsonResponseHandler() *Options[Request,
7171
x.ResponseHandler = JsonResponseHandler[Response]()
7272
return x
7373
}
74-
75-

0 commit comments

Comments
 (0)