Skip to content

Instantly share code, notes, and snippets.

View gschambial's full-sized avatar

Gourav Singh gschambial

View GitHub Profile
@chandermani
chandermani / AuthHttp.ts
Last active February 14, 2021 12:48
Angular 2, Http service wrapper to pass authorization token with each request.
import {Injectable, EventEmitter} from 'angular2/core';
import {Http, Headers, RequestOptions, RequestOptionsArgs, Response, RequestMethod, Request, Connection, ConnectionBackend} from 'angular2/http';
import * as Rx from 'rxjs';
export enum Action { QueryStart, QueryStop };
@Injectable()
export class AuthHttp {
process: EventEmitter<any> = new EventEmitter<any>();