xhttp

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2021 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Get

func Get(ctx context.Context, url string) string

Get ...

func NewClient

func NewClient() *client

NewClient ...

func NewClientWithOptions

func NewClientWithOptions(option *Option) *client

NewClientWithOptions ...

func Post

func Post(ctx context.Context, url string, body interface{}) string

Post ...

func ToBytes

func ToBytes(res *http.Response, err error) []byte

ToBytes ...

func ToString

func ToString(res *http.Response, err error) string

ToString ...

Types

type Option

type Option struct {
	SSLEnabled            bool
	TLSConfig             *tls.Config
	Compressed            bool
	HandshakeTimeout      time.Duration
	ResponseHeaderTimeout time.Duration
	RequestTimeout        time.Duration
	ConnsPerHost          int
	RetryTimes            int
}

Option ...

Jump to

Keyboard shortcuts

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