24
24
25
25
#include " mtconnect/config.hpp"
26
26
#include " mtconnect/entity/entity.hpp"
27
- #include " url_parser.hpp"
28
27
29
28
namespace mtconnect ::source::adapter {
30
29
struct Handler ;
@@ -53,7 +52,7 @@ namespace mtconnect::source::adapter::agent_adapter {
53
52
// / @param stream `true` if HTTP x-multipart-replace streaming is desired
54
53
// / @param next Function to determine what to do on successful read
55
54
Request (const std::optional<std::string> &device, const std::string &operation,
56
- const UrlQuery &query, bool stream, Next next)
55
+ const url:: UrlQuery &query, bool stream, Next next)
57
56
: m_sourceDevice(device),
58
57
m_operation (operation),
59
58
m_query(query),
@@ -65,15 +64,18 @@ namespace mtconnect::source::adapter::agent_adapter {
65
64
66
65
std::optional<std::string> m_sourceDevice; // /< optional source device
67
66
std::string m_operation; // /< The REST operation (probe, current, sample, asset)
68
- UrlQuery m_query; // /< URL Query parameters
67
+ url:: UrlQuery m_query; // /< URL Query parameters
69
68
bool m_stream; // /< `true` if using HTTP long pull
70
69
Next m_next; // /< function to call on successful read
71
70
int32_t m_agentVersion = 0 ; // /< agent version if required > 0 for asset requests
72
71
73
72
// / @brief Given a url, get a formatted target for a given operation
74
73
// / @param url The base url
75
74
// / @return a string with a new URL path and query (for the GET)
76
- auto getTarget (const Url &url) { return url.getTarget (m_sourceDevice, m_operation, m_query); }
75
+ auto getTarget (const url::Url &url)
76
+ {
77
+ return url.getTarget (m_sourceDevice, m_operation, m_query);
78
+ }
77
79
};
78
80
79
81
virtual ~Session () {}
0 commit comments