Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

middleware in go json rest #213

Open
PhanHaHus opened this issue Apr 24, 2017 · 2 comments
Open

middleware in go json rest #213

PhanHaHus opened this issue Apr 24, 2017 · 2 comments

Comments

@PhanHaHus
Copy link

anyone have example writing middleware before access the api ? Pls , middleware of author I cant custom. :(

@wingyplus
Copy link

The middleware interface is here https://github.com/ant0ine/go-json-rest/blob/master/rest/middleware.go

If you have middleware struct you should implement method 'MiddlewareFunc', but if you have function you can use type 'MiddlewareSimple' to create it

@PhanHaHus
Copy link
Author

Now im using echo framework to create API and it already has middleware built in, but thanks you for help :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants