Skip to content

Latest commit

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

method

Middlware method implements HTTP method override for Macaron.

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/Unknwon/macaron""github.com/macaron-contrib/method"
)
funcmain() {
m:=macaron.Classic()
m.Before(method.Override())
m.Run()
}

Credits

This package is forked from martini-contrib/method with modifications.

License

This project is under Apache v2 License. See the LICENSE file for the full license text.

About

❗❗❗ [deprecated] Moved to https://github.com/go-macaron/method

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages