http

package
v0.0.0-...-c38fcd0 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RequestPost

func RequestPost[T any](apiurl string, requestData any, code, requestType string) (*T, error)

Types

type ErrorMsg

type ErrorMsg struct {
	Msg string `json:"msg"`
}

type HTTPRequest

type HTTPRequest struct {
	Token string `json:"as_token"`
	Code  string `json:"as_code"`
	Data  any    `json:"as_data"`
}

func (*HTTPRequest) GetFormData

func (r *HTTPRequest) GetFormData() url.Values

type HTTPResult

type HTTPResult[T any] struct {
	Code string `json:"code"`
	Msg  string `json:"msg"`
	Data T      `json:"data"`
}

Jump to

Keyboard shortcuts

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