httputils

package
v0.0.0-...-b9337ff Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HttpDelete

func HttpDelete(method, url string, headers map[string]string) (interface{}, bool)

func HttpDo

func HttpDo(method, url string, headers, params map[string]string, data []byte) (interface{}, bool)

func HttpGet

func HttpGet(method, url string, headers, params map[string]string) (interface{}, bool)

func HttpHead

func HttpHead(method, url string, headers, params map[string]string) (interface{}, bool)

func HttpPatch

func HttpPatch(method, url string, headers, params map[string]string, data []byte) (interface{}, bool)

func HttpPost

func HttpPost(method, url string, headers, params map[string]string, data []byte) (interface{}, bool)

func HttpPut

func HttpPut(method, url string, headers, params map[string]string, data []byte) (interface{}, bool)

Types

type Client

type Client http.Client

1.通用请求操作,适用于GET,POST,PUT,DELETE,PATCH,HEAD等操作,GET,DELETE,HEAD等操作参数传递的时候需要将params和data

设置为nil

func (*Client) Request

func (client *Client) Request(method string, url string, params map[string]string, headers map[string]string, data []byte)

Jump to

Keyboard shortcuts

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