UNPKG

@sigiljs/sigil

Version:

TypeScript-first Node.js HTTP framework offering schema-driven routing, modifier-based middleware, plugin extensibility, and flexible response templating

2 lines (1 loc) 556 B
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("../../utils/safe-url.js");class s{protocol;host;path;method;headers;remoteAddress;#e;#t;constructor(e){this.#t=e,this.headers=e.headers,this.host=e.host,this.path=e.path,this.method=e.method,this.protocol=e.protocol,this.remoteAddress=e.remoteAddress}createClientRequest(e){return this.#e?this.#e:(this.#e={...this.#t,params:e},this.#e)}fullUri(){return t.default(`${this.protocol}://${this.host}${this.path}`)}}exports.default=s;