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

Using httprouter with go-json-rest #172

Open
MrXu opened this issue Dec 28, 2015 · 2 comments
Open

Using httprouter with go-json-rest #172

MrXu opened this issue Dec 28, 2015 · 2 comments
Labels

Comments

@MrXu
Copy link

MrXu commented Dec 28, 2015

Instead of using the default router, is it possible to use the httprouter with go-json-rest?

@ant0ine
Copy link
Owner

ant0ine commented Jan 18, 2016

Yes, on top of go-json-rest stack of middlewares must be an App. Which does not have to be the default router. Anything satisfying the App interface will do. It should be possible to take any third party router, and wrap it into an App.

The App interface is defined like this:

type App interface {
    AppFunc() HandlerFunc
}

@malzola
Copy link

malzola commented Mar 11, 2016

I'm trying to do the opposite. In order to use manyminds/api2go with go-json-rest, I'm trying to write a api2go adapter. I need to get a http.Handler from go-json-rest and I am quite lost.

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

No branches or pull requests

3 participants