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_REQUEST_DATA_H
17 #define OHOS_ACELITE_REQUEST_DATA_H
18 
19 #include <map>
20 #include <string>
21 
22 namespace OHOS {
23 namespace ACELite {
24 class RequestData {
25 public:
26     RequestData();
27 
28     void SetUrl(const std::string &urlPara);
29 
30     void SetMethod(const std::string &methodPara);
31 
32     void SetHeader(const std::string &key, const std::string &val);
33 
34     void SetBody(const std::string &bodyPara);
35 
36     void SetResponseType(const std::string &respType);
37 
38     [[nodiscard]] const std::string &GetUrl() const;
39 
40     [[nodiscard]] const std::map<std::string, std::string> &GetHeader() const;
41 
42     [[nodiscard]] const std::string &GetMethod() const;
43 
44     [[nodiscard]] const std::string &GetBody() const;
45 
46     [[nodiscard]] const std::string &GetResponseType() const;
47 
48 private:
49     std::string url;
50     std::map<std::string, std::string> header;
51     std::string method;
52     std::string body;
53     std::string responseType;
54 };
55 } // namespace ACELite
56 } // namespace OHOS
57 
58 #endif /* OHOS_ACELITE_REQUEST_DATA_H */
59