
The BaseRequestOptions class is responsible for declaring default values, while the RequestOptions class is merely responsible for setting values based on values provided in the constructor.
9 lines
221 B
TypeScript
9 lines
221 B
TypeScript
import {Injectable} from 'angular2/di';
|
|
|
|
// Make sure not to evaluate this in a non-browser environment!
|
|
@Injectable()
|
|
export class BrowserXhr {
|
|
constructor() {}
|
|
build(): any { return <any>(new XMLHttpRequest()); }
|
|
}
|