func ExampleNew() { // Creating client1 client1 := resty.New() client1.R().Get("http://httpbin.org/get") // Creating client2 client2 := resty.New() client2.R().Get("http://httpbin.org/get") }
func (c *APIClient) prepareClient() *resty.Client { rClient := resty.New() rClient.SetDebug(c.config.Debug) if c.config.Transport != nil { rClient.SetTransport(c.config.Transport) } if c.config.Timeout != nil { rClient.SetTimeout(*c.config.Timeout) } rClient.SetLogger(ioutil.Discard) return rClient }