http

package
v1.2.11 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2023 License: Apache-2.0 Imports: 7 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 {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(timeout int) *Client

func (*Client) BuildRequest

func (c *Client) BuildRequest(ctx context.Context, method, uri string, params interface{}) (*http.Request, error)

func (*Client) Do

func (c *Client) Do(ctx context.Context, request *http.Request) ([]byte, error)

func (*Client) Get

func (c *Client) Get(ctx context.Context, uri string) ([]byte, error)

func (*Client) Post

func (c *Client) Post(ctx context.Context, uri string, params interface{}, contextType string) ([]byte, error)

func (*Client) PostForm

func (c *Client) PostForm(ctx context.Context, uri string, params interface{}) ([]byte, error)

func (*Client) PostJson

func (c *Client) PostJson(ctx context.Context, uri string, params interface{}) ([]byte, error)

Jump to

Keyboard shortcuts

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