]> git.basschouten.com Git - openhab-addons.git/blob
294450a21bb755fbb2086e4379b8731ec10c126b
[openhab-addons.git] /
1 /**
2  * Copyright (c) 2010-2023 Contributors to the openHAB project
3  *
4  * See the NOTICE file(s) distributed with this work for additional
5  * information.
6  *
7  * This program and the accompanying materials are made available under the
8  * terms of the Eclipse Public License 2.0 which is available at
9  * http://www.eclipse.org/legal/epl-2.0
10  *
11  * SPDX-License-Identifier: EPL-2.0
12  */
13 package org.openhab.binding.mybmw.internal.utils;
14
15 import org.eclipse.jdt.annotation.NonNullByDefault;
16
17 /**
18  * The {@link HTTPConstants} interface contains fields mapping thing configuration parameters.
19  *
20  * @author Bernd Weymann - Initial contribution
21  * @author Martin Grassl - added image content type
22  */
23 @NonNullByDefault
24 public interface HTTPConstants {
25     static final int HTTP_TIMEOUT_SEC = 10;
26
27     static final String CONTENT_TYPE_URL_ENCODED = "application/x-www-form-urlencoded";
28     static final String CONTENT_TYPE_JSON = "application/json";
29     static final String CONTENT_TYPE_IMAGE = "image/png";
30     static final String KEEP_ALIVE = "Keep-Alive";
31     static final String CLIENT_ID = "client_id";
32     static final String RESPONSE_TYPE = "response_type";
33     static final String TOKEN = "token";
34     static final String CODE = "code";
35     static final String CODE_VERIFIER = "code_verifier";
36     static final String STATE = "state";
37     static final String NONCE = "nonce";
38     static final String REDIRECT_URI = "redirect_uri";
39     static final String AUTHORIZATION = "authorization";
40     static final String GRANT_TYPE = "grant_type";
41     static final String SCOPE = "scope";
42     static final String CREDENTIALS = "Credentials";
43     static final String USERNAME = "username";
44     static final String PASSWORD = "password";
45     static final String CONTENT_LENGTH = "Content-Length";
46     static final String CODE_CHALLENGE = "code_challenge";
47     static final String CODE_CHALLENGE_METHOD = "code_challenge_method";
48     static final String ACCESS_TOKEN = "access_token";
49     static final String TOKEN_TYPE = "token_type";
50     static final String EXPIRES_IN = "expires_in";
51     static final String CHUNKED = "chunked";
52
53     // HTTP headers for BMW API
54     static final String HEADER_ACP_SUBSCRIPTION_KEY = "ocp-apim-subscription-key";
55     static final String HEADER_X_USER_AGENT = "x-user-agent";
56     static final String HEADER_X_IDENTITY_PROVIDER = "x-identity-provider";
57     static final String HEADER_X_CORRELATION_ID = "x-correlation-id";
58     static final String HEADER_BMW_CORRELATION_ID = "bmw-correlation-id";
59     static final String HEADER_BMW_VIN = "bmw-vin";
60 }