2015-08-20 14:28:25 -07:00
|
|
|
import {StringMap, StringMapWrapper} from 'angular2/src/core/facade/collection';
|
2015-06-19 12:14:12 -07:00
|
|
|
|
2015-06-24 00:27:07 -07:00
|
|
|
/**
|
|
|
|
* Supported http methods.
|
|
|
|
*/
|
2015-06-19 10:18:44 -07:00
|
|
|
export enum RequestMethods {
|
2015-08-26 13:40:12 -07:00
|
|
|
Get,
|
|
|
|
Post,
|
|
|
|
Put,
|
|
|
|
Delete,
|
|
|
|
Options,
|
|
|
|
Head,
|
|
|
|
Patch
|
2015-06-19 10:18:44 -07:00
|
|
|
}
|
2015-04-28 23:07:55 -07:00
|
|
|
|
2015-06-24 00:27:07 -07:00
|
|
|
/**
|
|
|
|
* All possible states in which a connection can be, based on
|
|
|
|
* [States](http://www.w3.org/TR/XMLHttpRequest/#states) from the `XMLHttpRequest` spec, but with an
|
|
|
|
* additional "CANCELLED" state.
|
|
|
|
*/
|
2015-06-19 10:18:44 -07:00
|
|
|
export enum ReadyStates {
|
2015-08-26 13:40:12 -07:00
|
|
|
Unsent,
|
|
|
|
Open,
|
|
|
|
HeadersReceived,
|
|
|
|
Loading,
|
|
|
|
Done,
|
|
|
|
Cancelled
|
2015-06-19 10:18:44 -07:00
|
|
|
}
|
2015-04-28 23:07:55 -07:00
|
|
|
|
2015-06-24 00:27:07 -07:00
|
|
|
/**
|
|
|
|
* Acceptable response types to be associated with a {@link Response}, based on
|
|
|
|
* [ResponseType](https://fetch.spec.whatwg.org/#responsetype) from the Fetch spec.
|
|
|
|
*/
|
2015-06-19 10:18:44 -07:00
|
|
|
export enum ResponseTypes {
|
|
|
|
Basic,
|
|
|
|
Cors,
|
|
|
|
Default,
|
|
|
|
Error,
|
|
|
|
Opaque
|
|
|
|
}
|