httpclient

package module
v1.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 30, 2022 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewHTTP2Client

func NewHTTP2Client(timeout time.Duration, tlsConf *tls.Config) (*http.Client, error)

NewHTTP2Client provides you with an http2 client that is configured with the NewTransporter.

func NewHTTP2Transporter

func NewHTTP2Transporter(timeout time.Duration, tlsConf *tls.Config) (*http.Transport, error)

NewHTTP2Transporter is the same as NewTransporter but also configures it for HTTP2 connections.

func NewHTTPClient

func NewHTTPClient(timeout time.Duration, tlsConf *tls.Config) *http.Client

NewHTTPClient provides you with an http client that is configured with the NewTransporter.

func NewTransporter

func NewTransporter(timeout time.Duration, tlsConf *tls.Config) *http.Transport

NewTransporter configures a transporter that ensures you are never stuck in an infinite timeout and ensures that you don't leak connections. For example, your connection can get stuck in Dial forever even if you have a client timeout set, so this transport ensures that never happens.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL