mods

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2014 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Modules = map[string]map[string]HttpApiFunc{
		"GET":     {},
		"POST":    {},
		"DELETE":  {},
		"OPTIONS": {},
	}
)

Functions

func ParseForm

func ParseForm(r *http.Request) error

If we don't do this, POST method without Content-type (even with empty body) will fail

func Register

func Register(method string, route string, fct HttpApiFunc) error

func StreamJSON

func StreamJSON(job *engine.Job, w http.ResponseWriter, flush bool)

Types

type HttpApiFunc

type HttpApiFunc func(eng *engine.Engine, version version.Version, w http.ResponseWriter, r *http.Request, vars map[string]string) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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