UNPKG

1.71 kBTypeScriptView Raw
1/**
2 * @license
3 * Copyright Google Inc. All Rights Reserved.
4 *
5 * Use of this source code is governed by an MIT-style license that can be
6 * found in the LICENSE file at https://angular.io/license
7 */
8/**
9 * Supported http methods.
10 * @deprecated see https://angular.io/guide/http
11 * @publicApi
12 */
13export declare enum RequestMethod {
14 Get = 0,
15 Post = 1,
16 Put = 2,
17 Delete = 3,
18 Options = 4,
19 Head = 5,
20 Patch = 6
21}
22/**
23 * All possible states in which a connection can be, based on
24 * [States](http://www.w3.org/TR/XMLHttpRequest/#states) from the `XMLHttpRequest` spec, but with an
25 * additional "CANCELLED" state.
26 * @deprecated see https://angular.io/guide/http
27 * @publicApi
28 */
29export declare enum ReadyState {
30 Unsent = 0,
31 Open = 1,
32 HeadersReceived = 2,
33 Loading = 3,
34 Done = 4,
35 Cancelled = 5
36}
37/**
38 * Acceptable response types to be associated with a {@link Response}, based on
39 * [ResponseType](https://fetch.spec.whatwg.org/#responsetype) from the Fetch spec.
40 * @deprecated see https://angular.io/guide/http
41 * @publicApi
42 */
43export declare enum ResponseType {
44 Basic = 0,
45 Cors = 1,
46 Default = 2,
47 Error = 3,
48 Opaque = 4
49}
50/**
51 * Supported content type to be automatically associated with a {@link Request}.
52 * @deprecated see https://angular.io/guide/http
53 */
54export declare enum ContentType {
55 NONE = 0,
56 JSON = 1,
57 FORM = 2,
58 FORM_DATA = 3,
59 TEXT = 4,
60 BLOB = 5,
61 ARRAY_BUFFER = 6
62}
63/**
64 * Define which buffer to use to store the response
65 * @deprecated see https://angular.io/guide/http
66 * @publicApi
67 */
68export declare enum ResponseContentType {
69 Text = 0,
70 Json = 1,
71 ArrayBuffer = 2,
72 Blob = 3
73}