SetScheme set the default scheme for client, will be used when there is no scheme in the request URL (e.g. "github.com/imroc/req").
(scheme string)
| 559 | // SetScheme set the default scheme for client, will be used when |
| 560 | // there is no scheme in the request URL (e.g. "github.com/imroc/req"). |
| 561 | func (c *Client) SetScheme(scheme string) *Client { |
| 562 | if !util.IsStringEmpty(scheme) { |
| 563 | c.scheme = strings.TrimSpace(scheme) |
| 564 | } |
| 565 | return c |
| 566 | } |
| 567 | |
| 568 | // GetLogger return the internal logger, usually used in middleware. |
| 569 | func (c *Client) GetLogger() Logger { |