client

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetIP

func GetIP(req *http.Request) string

func SetTimeout

func SetTimeout(val time.Duration)

Set request timeout

func Timeout

func Timeout() time.Duration

Get request timeout

Types

type Client

type Client interface {
	Post(ctx context.Context, url string, body []byte, headers map[string]string) (*http.Response, error)
	Get(ctx context.Context, url string, headers map[string]string) (*http.Response, error)
}

func New

func New() Client

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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