request

package
Version: v0.9.4 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2019 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrorNoJSONHeader = errors.New("a")

ErrorNoJSONHeader determines that the current request have no JSON headers.

Functions

This section is empty.

Types

type HTTP

type HTTP struct {
	Request     *http.Request
	Body        string
	Writer      http.ResponseWriter
	Params      httprouter.Params
	Additionals map[string]interface{}
}

HTTP represents the web server request.

func (*HTTP) JSON added in v0.5.1

func (req *HTTP) JSON(data interface{}) error

JSON transforms the input body that's formatted in

type Type

type Type uint

Type is the name of the response type.

const (
	GetRequest Type = iota
	HeadRequest
	PostRequest
	PutRequest
	PatchRequest
	DeleteRequest
)

Indicate the available response types.

Source Files

Jump to

Keyboard shortcuts

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