2015-06-24 00:27:07 -07:00
|
|
|
/**
|
|
|
|
* Supported http methods.
|
|
|
|
*/
|
2015-12-03 22:44:14 +01:00
|
|
|
export enum RequestMethod {
|
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-12-03 22:44:14 +01:00
|
|
|
export enum ReadyState {
|
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-12-03 22:44:14 +01:00
|
|
|
export enum ResponseType {
|
2015-06-19 10:18:44 -07:00
|
|
|
Basic,
|
|
|
|
Cors,
|
|
|
|
Default,
|
|
|
|
Error,
|
|
|
|
Opaque
|
|
|
|
}
|