stackpress
Version:
Incept is a content management framework.
17 lines (16 loc) • 489 B
JavaScript
import map from '@stackpress/lib/map';
import { nest } from '@stackpress/lib/Nest';
export default class Request {
data;
headers;
session;
url = new URL('http://unknownhost/');
method;
constructor(config) {
this.data = nest(config.data);
this.url = new URL(config.url.href);
this.headers = map(Object.entries(config.headers));
this.session = map(Object.entries(config.session));
this.method = config.method || 'GET';
}
}