All Projects → martini-contrib → method

martini-contrib / method

Licence: MIT license
Martini HTTP method overriding via Header or form fields.

Programming Languages

go
31211 projects - #10 most used programming language

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

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].