httputil

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ContentType     = "Content-Type"
	ApplicationJson = "application/json"
)

Variables

This section is empty.

Functions

func GetByUrl

func GetByUrl(url string) (*http.Response, error)

func GetRequestByUrl

func GetRequestByUrl(url string) (*http.Response, error)

func HttpPostJson added in v0.0.2

func HttpPostJson(url string, params interface{}) ([]byte, error)

func PostJson

func PostJson(data interface{}, url string) (*http.Response, error)

func ResponseBytes added in v0.0.4

func ResponseBytes(w http.ResponseWriter, bytes []byte, fileName string)

func ResponseExcel added in v0.0.4

func ResponseExcel(w http.ResponseWriter, f *excelize.File) error

func ResponseTextFile added in v0.0.4

func ResponseTextFile(w http.ResponseWriter, file *os.File)

Types

This section is empty.

Jump to

Keyboard shortcuts

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