azure_core/
constants.rs

1/// Endpoints for Azure Resource Manager in different Azure clouds
2pub mod resource_manager_endpoint {
3    static_url!(
4        /// Azure Resource Manager China cloud endpoint
5        AZURE_CHINA_CLOUD,
6        "https://management.chinacloudapi.cn"
7    );
8
9    static_url!(
10        /// Azure Resource Manager Germany cloud endpoint
11        AZURE_GERMANY_CLOUD,
12        "https://management.microsoftazure.de"
13    );
14
15    static_url!(
16        /// Azure Resource Manager public cloud endpoint
17        AZURE_PUBLIC_CLOUD,
18        "https://management.azure.com"
19    );
20
21    static_url!(
22        /// Azure Resource Manager US government cloud endpoint
23        AZURE_US_GOVERNMENT_CLOUD,
24        "https://management.usgovcloudapi.net"
25    );
26}
27
28/// A list of known Azure authority hosts
29pub mod authority_hosts {
30    static_url!(
31        /// China-based Azure Authority Host
32        AZURE_CHINA_CLOUD,
33        "https://login.chinacloudapi.cn"
34    );
35
36    static_url!(
37        /// Germany-based Azure Authority Host
38        AZURE_GERMANY_CLOUD,
39        "https://login.microsoftonline.de"
40    );
41
42    static_url!(
43        /// US Government Azure Authority Host
44        AZURE_US_GOVERNMENT_CLOUD,
45        "https://login.microsoftonline.us"
46    );
47
48    static_url!(
49        /// Public Cloud Azure Authority Host
50        AZURE_PUBLIC_CLOUD,
51        "https://login.microsoftonline.com"
52    );
53}
54
55/// Constants related to the Content-Type header
56///
57/// <https://developer.mozilla.org/docs/Web/HTTP/Headers/Content-Type>
58pub mod content_type {
59    use crate::headers::HeaderValue;
60
61    // Form content types
62    // https://www.w3.org/TR/html401/interact/forms.html#h-17.13.4
63
64    pub const MULTIPART_FORM_DATA: HeaderValue = HeaderValue::from_static("multipart/form-data");
65    pub const APPLICATION_X_WWW_FORM_URLENCODED: HeaderValue =
66        HeaderValue::from_static("application/x-www-form-urlencoded");
67
68    pub const APPLICATION_XML: HeaderValue = HeaderValue::from_static("application/xml");
69    pub const APPLICATION_JSON: HeaderValue = HeaderValue::from_static("application/json");
70    pub const APPLICATION_OCTET_STREAM: HeaderValue =
71        HeaderValue::from_static("application/octet-stream");
72    pub const TEXT_PLAIN: HeaderValue = HeaderValue::from_static("text/plain");
73}
74
75/// Constants related to query parameters
76pub mod query_param {
77    pub const API_VERSION: &str = "api-version";
78}