Closed Bug 974084 Opened 12 years ago Closed 12 years ago

[Tracker] Change from URL paths to query strings for passing parameters

Categories

(Socorro Graveyard :: Middleware, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: peterbe, Assigned: adrian)

References

Details

Instead of using the URL path (e.g /product/Firefox/version/1.0) we should entirely use query strings (e.g. ?product=Firefox&version=1.0) Ideally we don't want to break backwards compatibility so we want to support both but only promote the query string way.
In theory, mainly a note-to-self, to be able to do this this should be all we'd need to change in middleware_app.py:: def GET(self, *args, **kwargs): # prepare parameters - params = kwargs + params = self._get_web_input_params() + params.update(kwargs)
I actually always liked that we had real URLs and not just some weird query stuff. But I guess that's how times change?
(In reply to Robert Kaiser (:kairo@mozilla.com) from comment #2) > I actually always liked that we had real URLs and not just some weird query > stuff. But I guess that's how times change? Indeed, times have changed :) In fact, that's not entirely true. It's always been that the path (of the URL) is there to find the method to process it and when that's found it picks up the parameters from the query string. Sometimes this paradigm is ignored so you get "pretty URLs" (e.g. www.some.com/blog/2014/heres-a-slug) but that's not applicable to an API that is meant to be consumed by a machine and not a user with her web browser.
Assignee: nobody → adrian
Blocks: 977134
Step 1: bug 978098 (collect pants) Step 2: bug 978100 (???) Step 3: bug 978102 (profit! )
Depends on: 978098, 978100, 978102
OS: Mac OS X → All
Hardware: x86 → All
Summary: Change from URL paths to query strings for passing parameters → [Tracker] Change from URL paths to query strings for passing parameters
Commit pushed to master at https://github.com/mozilla/socorro https://github.com/mozilla/socorro/commit/5c8c583dcb4160301e9294633ecb42d4a1da0da9 Fixes bugs 978098, 978100, 978102, 974084 - Use query string parameters in the middleware and the webapp. r=peterbe
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → 78
Product: Socorro → Socorro Graveyard
You need to log in before you can comment on or make changes to this bug.