util

package
v0.0.0-...-1ddd89f Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2017 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCorsHandler

func NewCorsHandler(handler http.Handler, allowOrigins []string) http.Handler

NewCorsHandler creates a new http.Handler to support CORS

Types

type MethodOverrider

type MethodOverrider struct {
	// contains filtered or unexported fields
}

MethodOverrider is a http.Handler for gin engine that supports method overriding

func NewMethodOverrider

func NewMethodOverrider(handler http.Handler) MethodOverrider

NewMethodOverrider creates a new http.Handler

func (MethodOverrider) ServeHTTP

func (m MethodOverrider) ServeHTTP(w http.ResponseWriter, r *http.Request)

ServeHTTP implements an interface of http.Handler. See https://golang.org/pkg/net/http/#Handler

Jump to

Keyboard shortcuts

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