2016-06-23 09:47:54 -07:00
|
|
|
/**
|
|
|
|
* @license
|
|
|
|
* Copyright Google Inc. All Rights Reserved.
|
|
|
|
*
|
|
|
|
* Use of this source code is governed by an MIT-style license that can be
|
|
|
|
* found in the LICENSE file at https://angular.io/license
|
|
|
|
*/
|
|
|
|
|
2016-04-28 17:50:03 -07:00
|
|
|
import {Injectable} from '@angular/core';
|
2015-04-28 23:07:55 -07:00
|
|
|
|
2015-12-03 15:49:09 -08:00
|
|
|
/**
|
|
|
|
* A backend for http that uses the `XMLHttpRequest` browser API.
|
|
|
|
*
|
|
|
|
* Take care not to evaluate this in non-browser contexts.
|
2016-06-27 12:27:23 -07:00
|
|
|
*
|
2017-08-28 10:29:35 -07:00
|
|
|
* @deprecated use @angular/common/http instead
|
2015-12-03 15:49:09 -08:00
|
|
|
*/
|
2015-04-28 23:07:55 -07:00
|
|
|
@Injectable()
|
2015-06-24 00:27:07 -07:00
|
|
|
export class BrowserXhr {
|
2015-06-19 12:14:12 -07:00
|
|
|
constructor() {}
|
2015-06-24 00:27:07 -07:00
|
|
|
build(): any { return <any>(new XMLHttpRequest()); }
|
2015-04-28 23:07:55 -07:00
|
|
|
}
|