1 /*
2  * Copyright (c) 2021 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 FOUNDATION_ACE_ADAPTER_PREVIEW_REQUESTDATA_H
17 #define FOUNDATION_ACE_ADAPTER_PREVIEW_REQUESTDATA_H
18 
19 #include <map>
20 #include <string>
21 
22 namespace OHOS::Ace {
23 class RequestData {
24 public:
GetUrl()25     const std::string GetUrl() const
26     {
27         return url_;
28     }
29 
SetUrl(const std::string url)30     void SetUrl(const std::string url)
31     {
32         url_ = url;
33     }
34 
GetData()35     const std::string GetData() const
36     {
37         return data_;
38     }
39 
SetData(const std::string data)40     void SetData(const std::string data)
41     {
42         data_ = data;
43     }
44 
GetHeader()45     const std::map<std::string, std::string> GetHeader() const
46     {
47         return header_;
48     }
49 
SetHeader(const std::map<std::string,std::string> header)50     void SetHeader(const std::map<std::string, std::string> header)
51     {
52         header_ = header;
53     }
54 
GetMethod()55     const std::string GetMethod() const
56     {
57         return method_;
58     }
59 
SetMethod(const std::string method)60     void SetMethod(const std::string method)
61     {
62         method_ = method;
63     }
64 
GetResponseType()65     const std::string GetResponseType() const
66     {
67         return responseType_;
68     }
69 
SetResponseType(const std::string responseType)70     void SetResponseType(const std::string responseType)
71     {
72         responseType_ = responseType;
73     }
74 
75 private:
76     std::string url_;
77     std::string data_;
78     std::map<std::string, std::string> header_;
79     std::string method_;
80     std::string responseType_;
81 };
82 } // namespace OHOS::Ace
83 
84 #endif // #ifndef FOUNDATION_ACE_ADAPTER_PREVIEW_REQUESTDATA_H
85