Revela/worker/context.js
2022-02-19 00:10:57 -05:00

14 lines
No EOL
429 B
JavaScript

class RequestContext {
constructor(ctx = {}) {
this.url = ctx.url || '';
this.method = ctx.method || 'GET';
this.body = ctx.body || null;
this.headers = ctx.headers || {};
this.mode = ctx.mode || 'cors';
this.redirect = ctx.redirect || 'manual';
this.referrer = ctx.referrer || '';
this.destination = ctx.destination || '';
};
};
export { RequestContext };