Skip to content

Martini HTTP method overriding via Header or form fields.

License

Notifications You must be signed in to change notification settings

bitrho/method

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

method wercker status

Martini middleware/handler for handling http method overrides. This checks for the X-HTTP-Method-Override header and uses it if the original request method is POST. GET/HEAD methods shouldn't be overriden, hence they can't be overriden.

This is useful for REST APIs and services making use of many HTTP verbs, and when http clients don't support all of them.

API Reference

Usage

import (
  "github.com/codegangsta/martini"
  "github.com/martini-contrib/method"
)

func main() {
  m := martini.Classic()
  m.Use(method.Override())
  m.Run()
}

Authors

About

Martini HTTP method overriding via Header or form fields.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 100.0%