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

Add URL Variable Rules #9

Open
dougblack opened this issue Jan 28, 2014 · 1 comment
Open

Add URL Variable Rules #9

dougblack opened this issue Jan 28, 2014 · 1 comment

Comments

@dougblack
Copy link
Owner

In many RESTful APIs, there is data stored in the URI. sleepy should be able to parse it out.

For example

/users/1

can be expressed as

/users/:id

and then id could be passed to the matching resource method as a url.Values key-value pair.

@L1fescape
Copy link

Hey @dougblack, I started working on a fix for this issue here. It works as you proposed where

/users/1

expressed as

/users/:id

will add a key id with a value of 1 to url.Values.

For the most part it's working, but there are somethings I could do better. If anyone has any suggestions, let me know! In the mean time I'll be fixing bugs with it and polishing up the code, then submitting a pull request.

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