http

package
v0.0.0-...-f0d4a1f Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseWrapDecoder

type BaseWrapDecoder struct{}

BaseWrapDecoder 基础封装

type BasicResponse

type BasicResponse struct {
	ErrCode int                 `json:"errcode"`
	ErrMsg  string              `json:"errmsg"`
	Data    jsoniter.RawMessage `json:"data"`
}

type NoneWrapDecoder

type NoneWrapDecoder struct{}

NoneWrapDecoder 无封装返回结果

type WrapDecoder

type WrapDecoder interface {
	// contains filtered or unexported methods
}

func BaseWrap

func BaseWrap() WrapDecoder

func NoneWrap

func NoneWrap() WrapDecoder

type WrapHttp

type WrapHttp struct {
	WrapDecoder WrapDecoder
}

func NewWrapHttp

func NewWrapHttp(wrap func() WrapDecoder) *WrapHttp

func (*WrapHttp) GetRequest

func (w *WrapHttp) GetRequest(url string, params map[string]string, result any) error

GetRequest get 请求

Jump to

Keyboard shortcuts

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