http

package
v0.0.0-...-e65efa9 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2024 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultClient = &Client{}

Functions

This section is empty.

Types

type Client

type Client struct {
	http.Client
	// contains filtered or unexported fields
}

func (*Client) Get

func (c *Client) Get(endpoint string, headers map[string]string) (*Response, error)

func (*Client) Post

func (c *Client) Post(endpoint string, headers map[string]string, body io.Reader) (*Response, error)

type RespBody

type RespBody struct {
	BodyLen  int64
	BodyText []byte
	// contains filtered or unexported fields
}

func (*RespBody) Close

func (rb *RespBody) Close() error

func (*RespBody) MakeCap

func (rb *RespBody) MakeCap(length int64)

func (*RespBody) Write

func (rb *RespBody) Write(p []byte) (int, error)

type Response

type Response = http.Response

func Get

func Get(url, proxy string, headers map[string]string, verify bool) (*Response, error)

func Post

func Post(url, proxy string, headers map[string]string, body io.Reader, verify bool) (*Response, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳