response

package
v1.5.10 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2021 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ContentTypeJSON = "application/json; charset=utf-8"
)

These are the constants used by the HTTP modules

Variables

This section is empty.

Functions

func Override

func Override(
	session sessionModel.Session,
	callback func(*http.Request, http.ResponseWriter),
) (interface{}, error)

Override overrides the default response.Write functionality by the given callback function; consumers must manually deal with response writer accordingly

func Write

func Write(
	session sessionModel.Session,
	responseObject interface{},
	responseError error,
)

Write responds to the consumer with corresponding HTTP status code and response body

Types

This section is empty.

Jump to

Keyboard shortcuts

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