httputil

package
v0.0.0-...-df633b8 Latest Latest
Warning

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

Go to latest
Published: May 31, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DefaultClient = &Client{client: defaultHttpClient}
)

Functions

This section is empty.

Types

type Client

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

func New

func New() *Client

func (*Client) Do

func (c *Client) Do(req *http.Request) (resp *http.Response, err error)

func (*Client) Get

func (c *Client) Get(url string) (resp *http.Response, err error)

func (*Client) GetWithAuth

func (c *Client) GetWithAuth(url, username, password string) (resp *http.Response, err error)

func (*Client) Patch

func (c *Client) Patch(url, contentType string, body io.Reader) (resp *http.Response, err error)

func (*Client) Post

func (c *Client) Post(url, contentType string, body io.Reader, username, password string) (resp *http.Response, err error)

func (*Client) PostForm

func (c *Client) PostForm(url string, data url.Values, username, password string) (resp *http.Response, err error)

func (*Client) PostJson

func (c *Client) PostJson(url string, body io.Reader, username, password string) (resp *http.Response, err error)

func (*Client) PostWithHeader

func (c *Client) PostWithHeader(url, contentType string, body io.Reader, username, password string, headers map[string]string) (resp *http.Response, err error)

func (*Client) Put

func (c *Client) Put(url, contentType string, body io.Reader, username, password string) (resp *http.Response, err error)

func (*Client) PutFile

func (c *Client) PutFile(url, contentType, file, username, password string) (resp *http.Response, err error)

func (*Client) PutJson

func (c *Client) PutJson(url string, body io.Reader, username, password string) (resp *http.Response, err error)

Jump to

Keyboard shortcuts

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