http

package
v1.0.20 Latest Latest
Warning

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

Go to latest
Published: May 6, 2022 License: Apache-2.0 Imports: 6 Imported by: 2

Documentation

Index

Constants

View Source
const (
	SUCCESS = 0
	FAIL    = 1
)

Variables

View Source
var DEFAULT_CONTENTTYPE = []byte("application/json;charset=utf-8")
View Source
var PageResultData = pageResultData{}
View Source
var PageResultDataBuilder = pageResultDataBuilder{}
View Source
var Result = result{}

Functions

func Error added in v1.0.1

func Error(ctx *fasthttp.RequestCtx, msg string, statusCode int)

func GetHeader added in v1.0.1

func GetHeader(ctx *fasthttp.RequestCtx, key, defaultV string) string

func GetParams added in v1.0.1

func GetParams(ctx *fasthttp.RequestCtx, key, defaultV string) string

func GetToken added in v1.0.1

func GetToken(ctx *fasthttp.RequestCtx) string
func Header(ctx *fasthttp.RequestCtx, key, defaultV string) (string, bool)

func JsonBody2Object added in v1.0.1

func JsonBody2Object(ctx *fasthttp.RequestCtx, obj any) error

func JsonBodyUnmarshalObject added in v1.0.1

func JsonBodyUnmarshalObject[T fastjson.Unmarshalable](ctx *fasthttp.RequestCtx, obj T) error

func Param added in v1.0.3

func Param(ctx *fasthttp.RequestCtx, key string) (string, bool)

func Params added in v1.0.1

func Params(ctx *fasthttp.RequestCtx) map[string]any

Types

type RequestChainHandler added in v1.0.15

type RequestChainHandler func(next fasthttp.RequestHandler) fasthttp.RequestHandler

type RequestHandlerChain added in v1.0.15

type RequestHandlerChain struct {
	// contains filtered or unexported fields
}

func (*RequestHandlerChain) Add added in v1.0.15

func (*RequestHandlerChain) Then added in v1.0.15

Jump to

Keyboard shortcuts

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