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)
Socorro Graveyard
Middleware
Tracking
(Not tracked)
RESOLVED
FIXED
78
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.
| Reporter | ||
Comment 1•12 years ago
|
||
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)
Comment 2•12 years ago
|
||
I actually always liked that we had real URLs and not just some weird query stuff. But I guess that's how times change?
| Reporter | ||
Comment 3•12 years ago
|
||
(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.
| Reporter | ||
Updated•12 years ago
|
Assignee: nobody → adrian
| Assignee | ||
Comment 4•12 years ago
|
||
| Assignee | ||
Updated•12 years ago
|
Summary: Change from URL paths to query strings for passing parameters → [Tracker] Change from URL paths to query strings for passing parameters
Comment 5•12 years ago
|
||
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
Updated•12 years ago
|
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Updated•12 years ago
|
Target Milestone: --- → 78
Updated•10 years ago
|
Product: Socorro → Socorro Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•