UNPKG

pluto-http-client

Version:

HTTP client for NodeJS. Inspired in the Java JAX-RS spec so you can expect excellence, versatility and extensibility.

40 lines (39 loc) 911 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.RequestContext = void 0; class RequestContext { constructor(req) { this._req = req; } accept(mediaType) { this._req.accept(mediaType); } acceptLanguage(locale) { this._req.acceptLanguage(locale); } acceptEncoding(encoding) { this._req.acceptEncoding(encoding); } cacheControl(cacheControl) { this._req.cacheControl(cacheControl); } cookie(cookie) { this._req.cookie(cookie); } header(key, value) { this._req.header(key, value); } url() { return this._req.getUrl(); } method() { return this._req.getMethod(); } headers() { return this._req.getHeaders(); } pipe(transform) { this._req.transform(transform); } } exports.RequestContext = RequestContext;