http

package
v0.0.0-...-83cf970 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddQueryParams

func AddQueryParams(parameters interface{}, query url.Values) error

func DecodeQueryString

func DecodeQueryString(r *http.Request, obj interface{}) error

func DecodeRequestBody

func DecodeRequestBody(r *http.Request, obj interface{}) error

func ModelMap

func ModelMap(model interface{}) (map[string]interface{}, error)

func RespondError

func RespondError(w http.ResponseWriter, statuscode int, err error)

Types

type Http

type Http struct {
}

func (*Http) GetRequest

func (h *Http) GetRequest(ctx context.Context, url string, criteria interface{}, parameters interface{}, headers map[string]string) ([]byte, error)

type HttpI

type HttpI interface {
	GetRequest(criteria interface{}, parameters interface{}) interface{}
}

Jump to

Keyboard shortcuts

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