feat(http): refactor library to work in dart
Mostly internal refactoring needed to make ts2dart and DartAnalyzer happy. Fixes #2415
This commit is contained in:
@ -1,3 +1,5 @@
|
||||
import {StringMap, StringMapWrapper} from 'angular2/src/facade/collection';
|
||||
|
||||
export enum RequestModesOpts {
|
||||
Cors,
|
||||
NoCors,
|
||||
@ -29,6 +31,14 @@ export enum RequestMethods {
|
||||
PATCH
|
||||
}
|
||||
|
||||
// TODO: Remove this when enum lookups are available in ts2dart
|
||||
// https://github.com/angular/ts2dart/issues/221
|
||||
export class RequestMethodsMap {
|
||||
private _methods: List<string>;
|
||||
constructor() { this._methods = ['GET', 'POST', 'PUT', 'DELETE', 'OPTIONS', 'HEAD', 'PATCH']; }
|
||||
getMethod(method: int): string { return this._methods[method]; }
|
||||
}
|
||||
|
||||
export enum ReadyStates {
|
||||
UNSENT,
|
||||
OPEN,
|
||||
|
Reference in New Issue
Block a user