http

package
v1.5.20-rc.2 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetResponse

func GetResponse(code int, message string, data interface{}) ([]byte, error)

GetResponse adaptor

func GetResponseEx

func GetResponseEx(code int, message string, data interface{}, extra map[string]interface{}) ([]byte, error)

GetResponseEx extension adaptor

Types

type APIResponse

type APIResponse struct {
	Result  bool        `json:"result"`
	Code    int         `json:"code"`
	Message string      `json:"message"`
	Data    interface{} `json:"data"`
}

APIResponse response for api request

type HeaderSet

type HeaderSet struct {
	Key   string
	Value string
}

HeaderSet http header set

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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