httpclient

package
v0.0.0-...-58c0a64 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewClient

func NewClient(config *Config) *http.Client

NewClient return a http client

func SendRequest

func SendRequest(client *http.Client, req *http.Request) (*http.Response, error)

SendRequest sends the request and close the response body

Types

type Config

type Config struct {
	ConnectTimeoutMS        int
	ConnKeepAliveMS         int
	ExpectContinueTimeoutMS int
	IdleConnTimeoutMS       int
	MaxAllIdleConns         int
	MaxHostIdleConns        int
	ResponseHeaderTimeoutMS int
	TLSHandshakeTimeoutMS   int
}

Config contains config the init a new http client

Jump to

Keyboard shortcuts

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