// SetHttpTransferMode sets the HttpTransferMode field's value.
499389
func (s *HlsAkamaiSettings) SetHttpTransferMode(v string) *HlsAkamaiSettings {
	s.HttpTransferMode = &v
	return s
}
724482
func NewTransport(tracer *zipkin.Tracer, options ...TransportOption) (http.RoundTripper, error) {
	if tracer == nil {
		return nil, ErrValidTracerRequired
	}

	t := &transport{
		tracer:     tracer,
		rt:         http.DefaultTransport,
		httpTrace:  false,
		errHandler: defaultErrHandler,
	}

	for _, option := range options {
		option(t)
	}

	return t, nil
}
456579
func NewTransport(t http.RoundTripper) http.RoundTripper {
	return NewTransportWith(stats.DefaultEngine, t)
}
280284
func (c *ContivClient) SetHTTPClient(newClient *http.Client) error {
	if newClient == nil {
		return errors.New("new http client cannot be nil")
	}

	c.httpClient = newClient

	return nil
}
1249830
func (s *Redirect) SetHttpRedirectCode(v string) *Redirect {
	s.HttpRedirectCode = &v
	return s
}
705396
func (s *DeleteMethodResponseInput) SetHttpMethod(v string) *DeleteMethodResponseInput {
	s.HttpMethod = &v
	return s
}
610792
func (s *NamespaceProperties) SetHttpProperties(v *HttpProperties) *NamespaceProperties {
	s.HttpProperties = v
	return s
}
143528
func (s *TaskExecutionResultDetail) SetTransferDuration(v int64) *TaskExecutionResultDetail {
	s.TransferDuration = &v
	return s
}
820982
func (s *NetworkBinding) SetHostPort(v int64) *NetworkBinding {
	s.HostPort = &v
	return s
}
738294
func (s *UpdateMethodResponseInput) SetHttpMethod(v string) *UpdateMethodResponseInput {
	s.HttpMethod = &v
	return s
}
970946
func NewHTTPTransport(url string, options ...HTTPOption) *HTTPTransport {
	c := &HTTPTransport{
		url:       url,
		client:    &http.Client{Timeout: defaultHTTPTimeout},
		batchSize: 100,
		spans:     []*j.Span{},
	}

	for _, option := range options {
		option(c)
	}
	return c
}
1097760
func (s *PutMethodInput) SetHttpMethod(v string) *PutMethodInput {
	s.HttpMethod = &v
	return s
}
974320
func (hook *SentryHook) SetHttpContext(h *raven.Http) {
	hook.client.SetHttpContext(h)
}
631261
func NewHTTPTransport(r http.RoundTripper, scheme, addr string) Transport {
	return httpTransport{
		RoundTripper: r,
		scheme:       scheme,
		addr:         addr,
	}
}
120104
func (o *ClientOptions) SetHTTPHeaders(h http.Header) *ClientOptions {
	o.HTTPHeaders = h
	return o
}
487316
func NewTransport(tlsConfig *tls.Config) *http.Transport {
	if tlsConfig == nil {
		tlsConfig = tlsconfig.ServerDefault()
	}

	direct := &net.Dialer{
		Timeout:   30 * time.Second,
		KeepAlive: 30 * time.Second,
		DualStack: true,
	}

	base := &http.Transport{
		Proxy:               http.ProxyFromEnvironment,
		Dial:                direct.Dial,
		TLSHandshakeTimeout: 10 * time.Second,
		TLSClientConfig:     tlsConfig,
		// TODO(dmcgowan): Call close idle connections when complete and use keep alive
		DisableKeepAlives: true,
	}

	proxyDialer, err := sockets.DialerFromEnvironment(direct)
	if err == nil {
		base.Dial = proxyDialer.Dial
	}
	return base
}
912716
func ConfigureTransport(tr *http.Transport, proto, addr string) error {
	switch proto {
	case "unix":
		return configureUnixTransport(tr, proto, addr)
	case "npipe":
		return configureNpipeTransport(tr, proto, addr)
	default:
		tr.Proxy = http.ProxyFromEnvironment
		dialer, err := DialerFromEnvironment(&net.Dialer{
			Timeout: defaultTimeout,
		})
		if err != nil {
			return err
		}
		tr.DialContext = dialer.DialContext
	}
	return nil
}