http_helper

package
v1.2.11 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertError

func ConvertError(err error) interface{}

Types

type JSONRequest

type JSONRequest struct {
	*http.Request
}

func WrapJSONRequest

func WrapJSONRequest(r *http.Request) *JSONRequest

func (*JSONRequest) JSON

func (r *JSONRequest) JSON() (objx.Map, error)

type JSONResponseWriter

type JSONResponseWriter interface {
	http.ResponseWriter
	WriteJSON(interface{}) error
	WriteJSONString(string) error
}

func WrapJSONResponseWriter

func WrapJSONResponseWriter(w http.ResponseWriter) JSONResponseWriter

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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