2016-06-23 16:47:54 +00: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-29 00:50:03 +00:00
|
|
|
import {Injectable} from '@angular/core';
|
2015-04-29 06:07:55 +00:00
|
|
|
|
2015-12-03 23:49:09 +00:00
|
|
|
/**
|
|
|
|
|
* A backend for http that uses the `XMLHttpRequest` browser API.
|
|
|
|
|
*
|
|
|
|
|
* Take care not to evaluate this in non-browser contexts.
|
|
|
|
|
*/
|
2015-04-29 06:07:55 +00:00
|
|
|
@Injectable()
|
2015-06-24 07:27:07 +00:00
|
|
|
export class BrowserXhr {
|
2015-06-19 19:14:12 +00:00
|
|
|
constructor() {}
|
2015-06-24 07:27:07 +00:00
|
|
|
build(): any { return <any>(new XMLHttpRequest()); }
|
2015-04-29 06:07:55 +00:00
|
|
|
}
|