Closed
Bug 1380437
Opened 7 years ago
Closed 5 years ago
Implement REST API utility methods in global.js to replace bugzilla_ajax(), eliminate JSON-RPC usage
Categories
(bugzilla.mozilla.org :: General, task)
Tracking
()
RESOLVED
FIXED
People
(Reporter: dylan, Assigned: kohei)
References
(Blocks 2 open bugs)
Details
Attachments
(2 files)
Per IRC chat, bugzilla_ajax() is very useful and should be available at all times.
Assignee | ||
Comment 1•6 years ago
|
||
thumbs-up |
* Use Promise and fetch instead of XHR * Append the API key to the HTTP request header instead of query string This will eventually replace jQuery.ajax, jQuery.getJSON and YAHOO.util.XHRDataSource.
Assignee | ||
Comment 2•6 years ago
|
||
And YAHOO.util.Connect.asyncRequest
Assignee | ||
Comment 3•6 years ago
|
||
One more note: since fetch() doesn't support the progress event [1], XMLHttpRequest is still required especially for uploading (large) attachments while showing a progress bar. So my plan is having both `Bugzilla.io.fetch` and `Bugzilla.io.xhr`. [1] https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/Using_XMLHttpRequest#Monitoring_progress
Assignee: sebastinssanty → kohei.yoshino
Assignee | ||
Comment 4•6 years ago
|
||
The `generate_api_token` variable could be removed as part of this change. It should be defaulted to 1 at least.
Assignee | ||
Comment 5•6 years ago
|
||
WIP: https://github.com/kyoshino/bmo/compare/bug-1380437-bugzilla-ajax
Assignee | ||
Updated•6 years ago
|
Assignee | ||
Updated•6 years ago
|
Status: NEW → ASSIGNED
Assignee | ||
Updated•6 years ago
|
Summary: Add bugzilla_ajax() to global.js (and remove from bug_modal.js) → Replace bugzilla_ajax() in bug_modal.js with new methods in global.js; eliminate JSON-RPC usage
Assignee | ||
Updated•6 years ago
|
Assignee | ||
Comment 6•6 years ago
|
||
bugzilla_ajax() has already been moved from bug_modal.js to global.js as part of Bug 1472954. This bug’s scope has changed.
Summary: Replace bugzilla_ajax() in bug_modal.js with new methods in global.js; eliminate JSON-RPC usage → Implement REST API utility methods in global.js to replace bugzilla_ajax(), eliminate JSON-RPC usage
Assignee | ||
Comment 7•6 years ago
|
||
Assignee | ||
Updated•5 years ago
|
Type: enhancement → task
Assignee | ||
Comment 8•5 years ago
|
||
Merged to master.
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 9•5 years ago
|
||
You need to log in
before you can comment on or make changes to this bug.
Description
•