Skip to content

martini-contrib/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

Contributors 4

  •  
  •  
  •  
  •  

Languages