// NewWithHTTP does the same thing as New but uses the given *http.Client
495053
func NewWithHTTP(http *http.Client) Client {
	c := newRouterClient()
	http.Transport = c.HTTP.Transport
	c.HTTP = http
	return c
}
628909
func WithHTTPClient(client *http.Client) ServerOption {
	return func(s *Server) {
		s.httpClient = client
	}
}
1319100
func NewHttpClient() *HttpClient {
	c := &HttpClient{
		reuseTransport: true,
		reuseJar:       true,
		lock:           new(sync.Mutex),
	}

	return c
}
1322419
func (o *CreateTaskParams) WithHTTPClient(client *http.Client) *CreateTaskParams {
	o.SetHTTPClient(client)
	return o
}
1090731
func New(options *AuthOptions, httpClient *http.Client) *Client {
	if httpClient == nil {
		httpClient = http.DefaultClient
	}

	return &Client{
		Options: options,
		Client:  httpClient,
	}
}
1151987
func NewHTTPClient(uri ...string) (client *HTTPClient) {
	client = new(HTTPClient)
	client.InitBaseClient()
	client.limiter.InitLimiter()
	client.httpClient.Transport = &client.Transport
	client.Header = make(http.Header)
	client.DisableCompression = true
	client.DisableKeepAlives = false
	client.MaxIdleConnsPerHost = 10
	client.httpClient.Jar = cookieJar
	if DisableGlobalCookie {
		client.httpClient.Jar, _ = cookiejar.New(nil)
	}
	client.SetURIList(uri)
	client.SendAndReceive = client.sendAndReceive
	return
}
1288427
func NewHTTP() *HTTP {
	return &HTTP{
		mp: NewMap(),
		Client: &http.Client{
			Timeout: 5 * time.Second,
		},
	}
}
1373580
func NewHTTP(remote, wsEndpoint string) *HTTP {
	rc := rpcclient.NewJSONRPCClient(remote)
	cdc := rc.Codec()
	ctypes.RegisterAmino(cdc)
	rc.SetCodec(cdc)

	return &HTTP{
		rpc:      rc,
		remote:   remote,
		WSEvents: newWSEvents(cdc, remote, wsEndpoint),
	}
}
816291
func (o *DiscoverOpenIDConfigurationParams) WithHTTPClient(client *http.Client) *DiscoverOpenIDConfigurationParams {
	o.SetHTTPClient(client)
	return o
}
1112218
func NewWithServer(s *http.Server) *Server {
	return &Server{
		Server:      s,
		KillTimeOut: 10 * time.Second,
		idlePool:    map[net.Conn]struct{}{},
		listeners:   map[net.Listener]struct{}{},
	}
}
864357
func NewHTTPClient(apiKeyPublic, apiKeyPrivate string) *HTTPClient {
	return &HTTPClient{
		apiKeyPublic:  apiKeyPublic,
		apiKeyPrivate: apiKeyPrivate,
		client:        http.DefaultClient,
	}
}
555586
func New(writer http.ResponseWriter, httpStatus int, message string) {
	response := &response{
		Response: message,
	}

	jsonResponse, err := json.Marshal(response)
	if err != nil {
		http.Error(writer, err.Error(), http.StatusInternalServerError)
	}

	writer.Header().Set("Content-Type", "application/json")
	writer.WriteHeader(httpStatus)
	writer.Write(jsonResponse)
}
1272071
func (o *PetUpdateParams) WithHTTPClient(client *http.Client) *PetUpdateParams {
	o.SetHTTPClient(client)
	return o
}
1316750
func NewHTTPServer(s *http.Server) *HTTPServer {
	return &HTTPServer{
		Server: s,
		done:   make(chan error, 1),
	}
}
836138
func New(ctx context.Context, h HandlerC) http.Handler {
        return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
                h.ServeHTTPC(ctx, w, r.WithContext(ctx))
        })
}
162393
func NewWithCustomHttpClient(apiKey, apiSecret string, httpClient *http.Client) *Bittrex {
	client := NewClientWithCustomHttpConfig(apiKey, apiSecret, httpClient)
	return &Bittrex{client}
}
346218
func (o *CreateJSONWebKeySetParams) WithHTTPClient(client *http.Client) *CreateJSONWebKeySetParams {
	o.SetHTTPClient(client)
	return o
}