Project

General

Profile

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
 * @experimental
11
 */
12
export declare enum RequestMethod {
13
    Get = 0,
14
    Post = 1,
15
    Put = 2,
16
    Delete = 3,
17
    Options = 4,
18
    Head = 5,
19
    Patch = 6,
20
}
21
/**
22
 * All possible states in which a connection can be, based on
23
 * [States](http://www.w3.org/TR/XMLHttpRequest/#states) from the `XMLHttpRequest` spec, but with an
24
 * additional "CANCELLED" state.
25
 * @experimental
26
 */
27
export declare enum ReadyState {
28
    Unsent = 0,
29
    Open = 1,
30
    HeadersReceived = 2,
31
    Loading = 3,
32
    Done = 4,
33
    Cancelled = 5,
34
}
35
/**
36
 * Acceptable response types to be associated with a {@link Response}, based on
37
 * [ResponseType](https://fetch.spec.whatwg.org/#responsetype) from the Fetch spec.
38
 * @experimental
39
 */
40
export declare enum ResponseType {
41
    Basic = 0,
42
    Cors = 1,
43
    Default = 2,
44
    Error = 3,
45
    Opaque = 4,
46
}
47
/**
48
 * Supported content type to be automatically associated with a {@link Request}.
49
 * @experimental
50
 */
51
export declare enum ContentType {
52
    NONE = 0,
53
    JSON = 1,
54
    FORM = 2,
55
    FORM_DATA = 3,
56
    TEXT = 4,
57
    BLOB = 5,
58
    ARRAY_BUFFER = 6,
59
}
60
/**
61
 * Define which buffer to use to store the response
62
 * @experimental
63
 */
64
export declare enum ResponseContentType {
65
    Text = 0,
66
    Json = 1,
67
    ArrayBuffer = 2,
68
    Blob = 3,
69
}
(4-4/14)