Fetch

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EasyJson

func EasyJson(endpoint string, reqData EasyJsonSerialization, respData EasyJsonSerialization, options ...Option) error

EasyJson 使用easyjson的json请求与响应

func Json

func Json(endpoint string, reqData any, respData any, options ...Option) error

Json json请求与响应

func SetHostOption

func SetHostOption(req *fasthttp.Request)

func Text

func Text(endpoint string, reqData string, options ...Option) (string, error)

Text text请求与响应

func UseCompressOption

func UseCompressOption(req *fasthttp.Request)

func UseGetOption

func UseGetOption(req *fasthttp.Request)

Types

type EasyJsonSerialization

type EasyJsonSerialization interface {
	MarshalJSON() ([]byte, error)
	UnmarshalJSON(data []byte) error
}

type Option

type Option func(req *fasthttp.Request)

Jump to

Keyboard shortcuts

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