UNPKG

angular2

Version:

Angular 2 - a web framework for modern web apps

40 lines (39 loc) 1.73 kB
/** * Supported http methods. */ export var RequestMethod; (function (RequestMethod) { RequestMethod[RequestMethod["Get"] = 0] = "Get"; RequestMethod[RequestMethod["Post"] = 1] = "Post"; RequestMethod[RequestMethod["Put"] = 2] = "Put"; RequestMethod[RequestMethod["Delete"] = 3] = "Delete"; RequestMethod[RequestMethod["Options"] = 4] = "Options"; RequestMethod[RequestMethod["Head"] = 5] = "Head"; RequestMethod[RequestMethod["Patch"] = 6] = "Patch"; })(RequestMethod || (RequestMethod = {})); /** * 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. */ export var ReadyState; (function (ReadyState) { ReadyState[ReadyState["Unsent"] = 0] = "Unsent"; ReadyState[ReadyState["Open"] = 1] = "Open"; ReadyState[ReadyState["HeadersReceived"] = 2] = "HeadersReceived"; ReadyState[ReadyState["Loading"] = 3] = "Loading"; ReadyState[ReadyState["Done"] = 4] = "Done"; ReadyState[ReadyState["Cancelled"] = 5] = "Cancelled"; })(ReadyState || (ReadyState = {})); /** * Acceptable response types to be associated with a {@link Response}, based on * [ResponseType](https://fetch.spec.whatwg.org/#responsetype) from the Fetch spec. */ export var ResponseType; (function (ResponseType) { ResponseType[ResponseType["Basic"] = 0] = "Basic"; ResponseType[ResponseType["Cors"] = 1] = "Cors"; ResponseType[ResponseType["Default"] = 2] = "Default"; ResponseType[ResponseType["Error"] = 3] = "Error"; ResponseType[ResponseType["Opaque"] = 4] = "Opaque"; })(ResponseType || (ResponseType = {}));