UNPKG

@angular/http

Version:
75 lines 3.04 kB
/** * @license * Copyright Google Inc. All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * Supported http methods. * @experimental */ 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. * @experimental */ 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. * @experimental */ 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 = {})); /** * Supported content type to be automatically associated with a {@link Request}. * @experimental */ export var ContentType; (function (ContentType) { ContentType[ContentType["NONE"] = 0] = "NONE"; ContentType[ContentType["JSON"] = 1] = "JSON"; ContentType[ContentType["FORM"] = 2] = "FORM"; ContentType[ContentType["FORM_DATA"] = 3] = "FORM_DATA"; ContentType[ContentType["TEXT"] = 4] = "TEXT"; ContentType[ContentType["BLOB"] = 5] = "BLOB"; ContentType[ContentType["ARRAY_BUFFER"] = 6] = "ARRAY_BUFFER"; })(ContentType || (ContentType = {})); /** * Define which buffer to use to store the response * @experimental */ export var ResponseContentType; (function (ResponseContentType) { ResponseContentType[ResponseContentType["Text"] = 0] = "Text"; ResponseContentType[ResponseContentType["Json"] = 1] = "Json"; ResponseContentType[ResponseContentType["ArrayBuffer"] = 2] = "ArrayBuffer"; ResponseContentType[ResponseContentType["Blob"] = 3] = "Blob"; })(ResponseContentType || (ResponseContentType = {})); //# sourceMappingURL=enums.js.map