UNPKG

x-ng2-http-interceptor

Version:
44 lines 1.71 kB
import { InterceptorRequest } from './interceptor-request'; import { InterceptorUtils } from './interceptor-utils'; /** * Utility builder for creating a new instance of InterceptorRequest * Use InterceptorRequestBuilder.new() to instantiate the builder */ export var InterceptorRequestBuilder = (function () { /** * Use InterceptorRequestBuilder.new() to instantiate the builder */ function InterceptorRequestBuilder() { } InterceptorRequestBuilder.new = function (request) { var builder = new InterceptorRequestBuilder(); InterceptorUtils.assign(builder, request); return builder; }; InterceptorRequestBuilder.prototype.url = function (url) { this._url = url; return this; }; InterceptorRequestBuilder.prototype.options = function (options) { this._options = options; return this; }; InterceptorRequestBuilder.prototype.sharedData = function (sharedData) { this._sharedData = sharedData; return this; }; InterceptorRequestBuilder.prototype.shortCircuitAtCurrentStep = function (shortCircuitAtCurrentStep) { this._shortCircuitAtCurrentStep = shortCircuitAtCurrentStep; return this; }; InterceptorRequestBuilder.prototype.alsoForceRequestCompletion = function (alsoForceRequestCompletion) { this._alsoForceRequestCompletion = alsoForceRequestCompletion; return this; }; InterceptorRequestBuilder.prototype.build = function () { this._sharedData = this._sharedData || {}; return new InterceptorRequest(this); }; return InterceptorRequestBuilder; }()); //# sourceMappingURL=interceptor-request-builder.js.map