1 /*
2  * Copyright (c) 2021-2022 Huawei Device Co., Ltd.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  *     http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
16 #ifndef OHOS_ACELITE_HTTP_CONSTANT_H
17 #define OHOS_ACELITE_HTTP_CONSTANT_H
18 
19 #include "non_copyable.h"
20 
21 namespace OHOS {
22 namespace ACELite {
23 class HttpConstant final {
24 public:
25     ACE_DISALLOW_COPY_AND_MOVE(HttpConstant);
26     static const int HTTP_RESPONSE_CODE_INVALID;
27 
28     static const char *const HTTP_RESPONSE_TYPE_JSON;
29 
30     static const char *const HTTP_HEADER_SEPARATOR;
31 
32     static const char *const HTTP_DEFAULT_USER_AGENT;
33 
34     static const char *const HTTP_DEFAULT_CONTENT_TYPE;
35     static const char *const HTTP_HEADER_KEY_CONTENT_TYPE;
36     static const char *const HTTP_CONTENT_TYPE_URL_ENCODE;
37     static const char *const HTTP_CONTENT_TYPE_JSON;
38 
39     static const char *const HTTP_URL_PARAM_SEPARATOR;
40     static const char *const HTTP_URL_PARAM_DELIMITER;
41 
42     static const char *const HTTP_METHOD_GET;
43     static const char *const HTTP_METHOD_HEAD;
44     static const char *const HTTP_METHOD_OPTIONS;
45     static const char *const HTTP_METHOD_TRACE;
46     static const char *const HTTP_METHOD_DELETE;
47     static const char *const HTTP_METHOD_POST;
48     static const char *const HTTP_METHOD_PUT;
49 
50     static const char *const KEY_HTTP_RESPONSE_CODE;
51     static const char *const KEY_HTTP_RESPONSE_DATA;
52     static const char *const KEY_HTTP_RESPONSE_HEADERS;
53 
54     static const char *const KEY_HTTP_REQUEST_URL;
55     static const char *const KEY_HTTP_REQUEST_DATA;
56     static const char *const KEY_HTTP_REQUEST_HEADER;
57     static const char *const KEY_HTTP_REQUEST_METHOD;
58     static const char *const KEY_HTTP_REQUEST_RESPONSE_TYPE;
59 
60 };
61 } // namespace ACELite
62 } // namespace OHOS
63 
64 #endif /* OHOS_ACELITE_HTTP_CONSTANT_H */
65