// POSTClient creates the equivalent HTTP POST rpcclient.Client.
439526
func (c *RPCClient) POSTClient() (*rpcclient.Client, error) {
	configCopy := *c.connConfig
	configCopy.HTTPPostMode = true
	return rpcclient.New(&configCopy, nil)
}
389792
func (o *FindParams) WithHTTPClient(client *http.Client) *FindParams {
	o.SetHTTPClient(client)
	return o
}
899532
func SetClient(client httptransport.HTTPClient) ClientOption {
	return func(c *Client) { c.client = client }
}
272120
func NewClient(p protocol.Protocol, t Transport) Client {
	return client{p: p, t: t}
}
220031
func NewClient(token string, c *http.Client) *Pushbullet {
	pb := &Pushbullet{
		token:  token,
		client: c,
	}

	return pb
}
763381
func (c *Config) WithHTTPClient(client *http.Client) *Config {
	c.HTTPClient = client
	return c
}
930398
func NewClient(addr string) (*Client, error) {
	client, err := rpcutils.GetCachedClient(addr)
	if err != nil {
		return nil, err
	}
	s := new(Client)
	s.addr = addr
	s.rpcClient = client
	return s, nil
}
55600
func (d *DNSProvider) postRequest(cmd string, data url.Values) (*response, error) {
	uri := d.config.BaseURL + cmd

	if d.config.AuthSid != "" {
		data.Set("auth-sid", d.config.AuthSid)
	}

	if d.config.Debug {
		log.Infof("postRequest:\n\tURL: %q\n\tData: %v", uri, data)
	}

	resp, err := d.config.HTTPClient.PostForm(uri, data)
	if err != nil {
		return nil, err
	}
	defer resp.Body.Close()

	body, err := ioutil.ReadAll(resp.Body)
	if err != nil {
		return nil, err
	}

	if resp.StatusCode != 200 {
		return nil, fmt.Errorf("HTTP error %d [%s]: %v", resp.StatusCode, http.StatusText(resp.StatusCode), string(body))
	}

	return parseResponse(string(body)), nil
}
1001208
func (o *GetEndpointIDConfigParams) WithHTTPClient(client *http.Client) *GetEndpointIDConfigParams {
	o.SetHTTPClient(client)
	return o
}
779954
func NewClient(opts ClientOpts) *Client {
	if opts.HTTPClient == nil {
		opts.HTTPClient = &http.Client{}
	}

	return &Client{
		token:      opts.Token,
		baseURL:    opts.BaseURL,
		httpClient: opts.HTTPClient,
		userAgent:  opts.UserAgent,
	}
}
734423
func (o *PatchEndpointIDParams) WithHTTPClient(client *http.Client) *PatchEndpointIDParams {
	o.SetHTTPClient(client)
	return o
}
895532
func (c *Client) PostForm(uri string, data url.Values) (*http.Response, error) {
	postForm := func(args ...interface{}) (*http.Response, error) {
		return c.HTTPClient.PostForm(args[0].(string), args[1].(url.Values))
	}

	resp, err := c.HTTPClient.PostForm(uri, data)
	if err != nil {
		if c.ExponentialBackoff {
			return c.backoff(postForm, uri, data)
		}
		return nil, err
	}

	if resp.StatusCode >= http.StatusInternalServerError && c.ExponentialBackoff {
		return c.backoff(postForm, uri, data)
	}

	return resp, err
}
953552
func NewClient(opts ...ClientOption) *Client {
	client := &Client{
		client:  &http.Client{Timeout: defaultTimeout},
		baseURL: defaultBaseURL,
	}
	for _, opt := range opts {
		opt(client)
	}
	return client
}
204113
func (c *UserClient) RESTClient() rest.Interface {
	if c == nil {
		return nil
	}
	return c.restClient
}
1277347
func WithHttpClient(client httpClient) func(rpc *EthRPC) {
	return func(rpc *EthRPC) {
		rpc.client = client
	}
}
1353941
func (o *GetStatusParams) WithHTTPClient(client *http.Client) *GetStatusParams {
	o.SetHTTPClient(client)
	return o
}
1189753
func (r *Resource) SetClient(c *http.Client) {
	r.Api.Client = c
}