http_client

package
v0.0.0-...-5eaabf4 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HttpClient

type HttpClient struct {
	// contains filtered or unexported fields
}

func InitHttpClient

func InitHttpClient() *HttpClient

func (*HttpClient) GET

func (c *HttpClient) GET(
	url string,
	headers []*RequestHeader,
	timeout time.Duration,
) (int, []byte, error)

func (*HttpClient) POST

func (c *HttpClient) POST(
	url string,
	data []byte,
	headers []*RequestHeader,
	timeout time.Duration,
) (int, []byte, error)

func (*HttpClient) POSTGzip

func (c *HttpClient) POSTGzip(
	url string,
	data []byte,
	headers []*RequestHeader,
	timeout time.Duration,
) (int, []byte, error)

type RequestHeader

type RequestHeader struct {
	Key   string `json:"key"`
	Value string `json:"value"`
}

Jump to

Keyboard shortcuts

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