I just want to know if anybody knows how to return a typename T class through a restful endpoint created with POCO remoting ng. A simplified version of what I tried:
//@ remote
//@ path="/rest/endpoint/{resource}"
class Endpoint
{
public:
//@ $resource={in=path}
template<typename T>
T get(std::string); // returns some kind of data based on the path variable
};
Then the implementation would be something like
template<typename T>
T Endpoint::get(std::string resource)
{
// returns the data based on the path variable
}
After doing the code generation and compiling, the generated classes did not know how to handle the typename T. Does anyone know if there is a way to achieve this? Or is there a POCO class I could use to handle this scenario?
Source: Windows Questions C++