http_interface.h
Go to the documentation of this file.
1 // Copyright 2022 Fraunhofer IPA
2 //
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 #pragma once
16 
17 #include <json/json.h>
18 
21 
22 class CurlResource;
23 
25 {
26 public:
27  HTTPInterface(std::string host, std::string path = "");
28 
29  const std::map<std::string, std::string>
30  get(const std::vector<std::string>& json_keys, const std::string& command,
31  const std::initializer_list<param_type>& list = std::initializer_list<param_type>());
32 
33  const std::map<std::string, std::string> get(const std::vector<std::string>& json_keys, const std::string& command,
34  const param_map_type& params = param_map_type());
35 
36 private:
37  const std::map<std::string, std::string> get_(const std::vector<std::string>& json_keys, CurlResource& res);
38 
39  const std::string host;
40  const std::string base_path;
41 };
const std::map< std::string, std::string > get_(const std::vector< std::string > &json_keys, CurlResource &res)
path
std::map< std::string, std::string > param_map_type
ROSLIB_DECL std::string command(const std::string &cmd)
HTTPInterface(std::string host, std::string path="")
const std::string base_path
const std::string host


pf_driver
Author(s): Harsh Deshpande
autogenerated on Fri Feb 24 2023 03:59:35