util

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2022 License: MIT Imports: 5 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenFormArgs

func GenFormArgs(variables map[string]interface{}) *fasthttp.Args

func GenQueryString

func GenQueryString(variables map[string]interface{}) string

func RandStringImpr

func RandStringImpr(n int) string

func RandomString

func RandomString(length int) string

Types

type ContentType

type ContentType int
const (
	Default ContentType = iota // 开始生成枚举值, 默认为0
	Json
)

type RequestOption

type RequestOption struct {
	Url         string
	Method      string
	ReqDto      interface{}
	Headers     map[string]string
	ContentType ContentType
}

type ResponseData

type ResponseData struct {
	Body       []byte
	Header     *fasthttp.ResponseHeader
	StatusCode int
}

func SendRequest

func SendRequest(option *RequestOption) (*ResponseData, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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