httputils

package
v0.0.0-...-0917db3 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Get

func Get(url string) ([]byte, error)

Get 发起get请求

func Post

func Post(url string, data []byte, contentType string) ([]byte, error)

Post 发起post请求

func PostFormData

func PostFormData(url string, formFile multipart.File, fileName string, fieldName string) ([]byte, error)

PostFormData 发起post请求,格式为Form-Data

func PostJson

func PostJson(url string, data interface{}) ([]byte, error)

PostJson 发起post请求,格式为JSON

func RawGet

func RawGet(url string) (*http.Response, []byte, error)

RawGet 发起get请求

func RawPost

func RawPost(url string, data []byte, contentType string) (*http.Response, []byte, error)

RawPost 发起post请求

Types

This section is empty.

Jump to

Keyboard shortcuts

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