http

package
v1.1.4 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
}

func NewClient

func NewClient() *Client

func (*Client) Get

func (c *Client) Get(url string, header map[string]string) (*Response, error)

func (*Client) Post

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

func (*Client) Request

func (c *Client) Request(options *Options) (res *Response, _ error)

type Options

type Options struct {
	Method  string
	Url     string
	Headers map[string]string
	Timeout time.Duration
	Body    io.Reader
}

type Response

type Response struct {
	*http.Response
	BodyBuffer *bytes.Buffer
}

Jump to

Keyboard shortcuts

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