UNPKG

x-ng2-http-interceptor

Version:
32 lines (31 loc) 1.59 kB
import { Request, RequestOptionsArgs, Response } from '@angular/http'; import { InterceptorRequestOptionsArgs } from './interceptor-request-options-args'; import { InterceptorResponseWrapper } from './interceptor-response-wrapper'; /** * Utility builder for creating a new instance of InterceptorResponseWrapper * Use InterceptorResponseBuilder.new() to instantiate the builder */ export declare class InterceptorResponseWrapperBuilder { protected _url: string | Request; protected _options?: RequestOptionsArgs | InterceptorRequestOptionsArgs; protected _response: Response; protected _sharedData?: any; protected _shortCircuitTriggeredBy?: number; protected _forceReturnResponse?: boolean; protected _forceRequestCompletion?: boolean; protected _responseGeneratedByShortCircuitHandler?: boolean; protected _err?: any; protected _errEncounteredAt?: number; protected _errEncounteredInRequestCycle?: boolean; static new(response: Response | InterceptorResponseWrapper): InterceptorResponseWrapperBuilder; /** * Use InterceptorResponseBuilder.new() to instantiate the builder */ protected constructor(); response(response: Response): InterceptorResponseWrapperBuilder; sharedData(sharedData: any): InterceptorResponseWrapperBuilder; forceReturnResponse(forceReturnResponse: boolean): InterceptorResponseWrapperBuilder; forceRequestCompletion(forceRequestCompletion: boolean): InterceptorResponseWrapperBuilder; err(err: any): InterceptorResponseWrapperBuilder; build(): InterceptorResponseWrapper; }