UNPKG

1.82 kBPlain TextView Raw
1// Copyright (c) Microsoft Corporation. All rights reserved.
2// Licensed under the MIT License. See License.txt in the project root for license information.
3
4export const Constants = {
5 /**
6 * The ms-rest version
7 * @const
8 * @type {string}
9 */
10 msRestVersion: "2.6.1",
11
12 /**
13 * Specifies HTTP.
14 *
15 * @const
16 * @type {string}
17 */
18 HTTP: "http:",
19
20 /**
21 * Specifies HTTPS.
22 *
23 * @const
24 * @type {string}
25 */
26 HTTPS: "https:",
27
28 /**
29 * Specifies HTTP Proxy.
30 *
31 * @const
32 * @type {string}
33 */
34 HTTP_PROXY: "HTTP_PROXY",
35
36 /**
37 * Specifies HTTPS Proxy.
38 *
39 * @const
40 * @type {string}
41 */
42 HTTPS_PROXY: "HTTPS_PROXY",
43
44 /**
45 * Specifies NO Proxy.
46 */
47 NO_PROXY: "NO_PROXY",
48
49 /**
50 * Specifies ALL Proxy.
51 */
52 ALL_PROXY: "ALL_PROXY",
53
54 HttpConstants: {
55 /**
56 * Http Verbs
57 *
58 * @const
59 * @enum {string}
60 */
61 HttpVerbs: {
62 PUT: "PUT",
63 GET: "GET",
64 DELETE: "DELETE",
65 POST: "POST",
66 MERGE: "MERGE",
67 HEAD: "HEAD",
68 PATCH: "PATCH",
69 },
70
71 StatusCodes: {
72 TooManyRequests: 429,
73 },
74 },
75
76 /**
77 * Defines constants for use with HTTP headers.
78 */
79 HeaderConstants: {
80 /**
81 * The Authorization header.
82 *
83 * @const
84 * @type {string}
85 */
86 AUTHORIZATION: "authorization",
87
88 AUTHORIZATION_SCHEME: "Bearer",
89
90 /**
91 * The Retry-After response-header field can be used with a 503 (Service
92 * Unavailable) or 349 (Too Many Requests) responses to indicate how long
93 * the service is expected to be unavailable to the requesting client.
94 *
95 * @const
96 * @type {string}
97 */
98 RETRY_AFTER: "Retry-After",
99
100 /**
101 * The UserAgent header.
102 *
103 * @const
104 * @type {string}
105 */
106 USER_AGENT: "User-Agent",
107 },
108};