_httpUtils

package
v0.0.0-...-5746ace Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2023 License: GPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddUrlPostFixIfNeeded

func AddUrlPostFixIfNeeded(url string) string

func CrsAuth

func CrsAuth() context.Handler

func GenUrl

func GenUrl(server string, path string) string

func GenUrlWithParams

func GenUrlWithParams(pth string, params map[string]interface{}, baseUrl string) (url string)

func Get

func Get(url string) (ret []byte, err error)

func IsSuccessCode

func IsSuccessCode(code int) (success bool)

func Post

func Post(url string, data interface{}) (ret []byte, err error)

func PostOrPut

func PostOrPut(url string, method string, data interface{}) (ret []byte, err error)

func Put

func Put(url string, data interface{}) (ret []byte, err error)

func RespData

func RespData(code consts.ResultCode, msg string, objects interface{}) (r *_domain.Response)

func RespDataFromBizErr

func RespDataFromBizErr(err *domain.BizErr) (r *_domain.Response)

func RespDataPagination

func RespDataPagination(code consts.ResultCode, msg string, objects interface{}, pageNo, pageSize int, total int64) (r *_domain.ResponsePage)

Types

This section is empty.

Jump to

Keyboard shortcuts

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