*/
static _init(endpoint, method = 'GET', params = {}) {
const url = new URL(`${BUGZILLA.config.basepath}rest/${endpoint}`, location.origin);
+ const token = BUGZILLA.api_token;
if (method === 'GET') {
for (const [key, value] of Object.entries(params)) {
}
/** @todo Remove this once Bug 1477163 is solved */
- url.searchParams.set('Bugzilla_api_token', BUGZILLA.api_token);
+ if (token) {
+ url.searchParams.set('Bugzilla_api_token', token);
+ }
return new Request(url, {
method,