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.
|
|
|
|
*/
|
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
|
|
|
}
|