-
Notifications
You must be signed in to change notification settings - Fork 382
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
How to convert http.HandlerFunc to rest.HandlerFunc #192
Comments
Agreed. There should be methods to switch from http.Request to rest.Request. Same for ResponseWriter |
@Telmo You mind checking if that PR fixes the issue? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I am trying to create a prometheus middleware for go-json-rest and I am running into issues due to the differences between the
rest.ResponseWriter
and thehttp.ResponseWriter
I am able to get the http.HandlerFunc for prometheus but when trying to get it into a
rest.Get
I am unable to convert thehttp.HandlerFunc
into arest.HandlerFunc
as far as I can tell the only difference between them is theResponseWriter
https://godoc.org/net/http#ResponseWriter
https://godoc.org/github.com/ant0ine/go-json-rest/rest#ResponseWriter
Is there a way to accomplish this? I am fairly new to go so if the answer is pretty obvious I apologize in advance :)
The text was updated successfully, but these errors were encountered: