http

package
v0.0.0-...-1b2c2ec Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Echo

func Echo(ctx *fasthttp.RequestCtx, code int, msg string, data interface{})

Types

type Client

type Client struct {
	Proxy   string
	Timeout time.Duration
	// contains filtered or unexported fields
}

func (*Client) Get

func (c *Client) Get(url string, headers map[string]string) (*fasthttp.Response, error)

func (*Client) Head

func (c *Client) Head(url string) (*fasthttp.Response, error)

func (*Client) Init

func (c *Client) Init()

func (*Client) Post

func (c *Client) Post(url string, body []byte, headers map[string]string) (*fasthttp.Response, error)

type Response

type Response struct {
	Code int         `json:"code"`
	Msg  string      `json:"msg,omitempy"`
	Data interface{} `json:"data,omitempy"`
}

Jump to

Keyboard shortcuts

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