httptool

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

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

Go to latest
Published: Apr 18, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Get

func Get(u string, q map[string]any, a ...any) (res *http.Response, err error)

func GetClient

func GetClient(u string, q map[string]any, a ...any) (res *http.Client, req *http.Request, err error)

func GetString

func GetString(u string, q map[string]any, a ...any) (r string, code int, err error)

func GetToJsonAny

func GetToJsonAny[T any](u string, q map[string]any, a ...any) (r T, code int, err error)

func Post

func Post(u string, types int, form map[string]any, a ...any) (res *http.Response, err error)

Post request

u url

types 1 x-www-form-urlencoded, 2 form-data, 3 json, 4 binary

func PostClient

func PostClient(u string, types int, form map[string]any, a ...any) (cli *http.Client, req *http.Request, err error)

func PostFormDataString

func PostFormDataString(u string, form map[string]any, a ...any) (r string, code int, err error)

func PostToJsonAny

func PostToJsonAny[T any](u string, types int, form map[string]any, a ...any) (r T, code int, err error)

func PostWwwString

func PostWwwString(u string, form map[string]any, a ...any) (r string, code int, err error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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