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
|
|
|
*
|
2018-06-01 22:09:01 +02:00
|
|
|
* @deprecated see https://angular.io/guide/http
|
2018-10-19 17:47:13 +01:00
|
|
|
* @publicApi
|
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() {}
|
2020-04-13 16:40:21 -07:00
|
|
|
build(): any {
|
|
|
|
return <any>(new XMLHttpRequest());
|
|
|
|
}
|
2015-04-28 23:07:55 -07:00
|
|
|
}
|