hareq

package
v0.1.9 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2021 License: MIT Imports: 8 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AuthFastGet

func AuthFastGet(url string, resData interface{}, th string) error

func AuthFastPost

func AuthFastPost(body interface{}, url string, resData interface{}, th string) error

post with body, url and auth, get decoded res

func BodyParser added in v0.0.14

func BodyParser(r *http.Request, body interface{}) error

http post req body parser

func FastGet

func FastGet(url string, resData interface{}) error

get with url, get decoded res

func FastPost

func FastPost(body interface{}, url string, resData interface{}) error

post with body and url, get decoded res

func FastUpload

func FastUpload(url string, body map[string]string, resData interface{}, files ...FileToUpload) error

func SendJson added in v0.0.15

func SendJson(w http.ResponseWriter, data interface{}) error

http send json

func SendString added in v0.0.15

func SendString(w http.ResponseWriter, data string) error

http send string

func SetStatus added in v0.0.15

func SetStatus(w http.ResponseWriter, status int)

http set header

Types

type FileToUpload added in v0.0.8

type FileToUpload struct {
	Name string
	Path string
}

Jump to

Keyboard shortcuts

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