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

Getting parsed runtime.Pattern from server mux #127

Closed
sadlil opened this issue Mar 4, 2016 · 2 comments
Closed

Getting parsed runtime.Pattern from server mux #127

sadlil opened this issue Mar 4, 2016 · 2 comments

Comments

@sadlil
Copy link

sadlil commented Mar 4, 2016

On development one of my scenario is to develop - one URL pattern to handle both usual verbs and OPTIONS verbs to allow CORS request for that specifi URL. Probably one of the way is to implement http.custom type for handle this request. But this request doesn't need any server side processing. only some common task as this. we can get the options request done from the gateway without sending it to server. For this we need the processed runtime.Patterns that are auto generated from the proto file. I was able to do this by hand by writing a file in same paclkage with *.pb.gw.go as i couldn't find anything to get the processed patterns. But this looks dirty.

it would be good if there is a way that can return those process Patterns.

@yugui
Copy link
Member

yugui commented Apr 18, 2016

mux is just an implementation of http.Handler. So you can wrap it with anything you want as you can do in generic http.Handlers.

@achew22
Copy link
Collaborator

achew22 commented Jan 4, 2017

Just doing a little bit of tidying. I hope that your question was answered in a way that let your project continue. If you have any more questions feel free to open another issue.

@achew22 achew22 closed this as completed Jan 4, 2017
@tamalsaha tamalsaha mentioned this issue Mar 30, 2017
1 task
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

3 participants