mirror of
https://github.com/certimate-go/certimate.git
synced 2026-10-29 17:58:19 +08:00
refactor: refactor sdk3rd client implementations to use a unified signer structure
This commit is contained in:
@@ -24,14 +24,14 @@ func NewClient(optFns ...OptionsFunc) (*Client, error) {
|
||||
return nil, fmt.Errorf("sdkerr: unset accessToken")
|
||||
}
|
||||
|
||||
restyClient := resty.New().
|
||||
httper := resty.New().
|
||||
SetBaseURL("https://api.linode.com/v4").
|
||||
SetHeader("Accept", "application/json").
|
||||
SetHeader("Authorization", "Bearer "+opts.AccessToken).
|
||||
SetHeader("Content-Type", "application/json").
|
||||
SetHeader("User-Agent", app.AppUserAgent)
|
||||
|
||||
return &Client{rc: restyClient}, nil
|
||||
return &Client{rc: httper}, nil
|
||||
}
|
||||
|
||||
func (c *Client) SetTimeout(timeout time.Duration) *Client {
|
||||
|
||||
Reference in New Issue
Block a user