http

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2020 License: Apache-2.0 Imports: 5 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	*http.Client
}

Client is a wrapper for http.Client.

func NewHTTPClient

func NewHTTPClient(c *http.Client) *Client

NewHTTPClient creates a HTTP Client.

func (*Client) Delete

func (c *Client) Delete(url string) error

Delete sends a HTTP DELETE request to the specified URL.

func (*Client) Get

func (c *Client) Get(url string) ([]byte, error)

Get sends a HTTP GET request to the specified URL.

func (*Client) Post

func (c *Client) Post(url string, bodyType string, body io.Reader) ([]byte, error)

Post sends a HTTP POST request to the specified URL.

func (*Client) Put

func (c *Client) Put(url string, bodyType string, body io.Reader) ([]byte, error)

Put sends a HTTP PUT request to the specified URL.

Jump to

Keyboard shortcuts

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