http_helper

package
v1.3.0-alpha.5 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2024 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
	WriteJSONError(code int, err error) 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