mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-27 16:39:29 -05:00
Added name of requests to be used by GUI
This commit is contained in:
parent
ae95b49f8a
commit
39967b7ce7
@ -368,6 +368,9 @@ std::string ApiServer::handleRequest(Request &request)
|
||||
if(data.isRawData())
|
||||
return data.getRawData();
|
||||
|
||||
if(!resp.mCallbackName.empty())
|
||||
outstream << resource_api::makeKeyValueReference("callback_name", resp.mCallbackName);
|
||||
|
||||
outstream << resource_api::makeKeyValue("debug_msg", debugString.str());
|
||||
outstream << resource_api::makeKeyValueReference("returncode", returncode);
|
||||
if(!resp.mStateToken.isNull())
|
||||
|
@ -252,6 +252,9 @@ public:
|
||||
|
||||
StateToken mStateToken;
|
||||
|
||||
//Just for GUI benefit
|
||||
std::string mCallbackName;
|
||||
|
||||
// the result
|
||||
StreamBase& mDataStream;
|
||||
|
||||
|
@ -37,6 +37,13 @@ ResponseTask* ResourceRouter::handleRequest(Request& req, Response& resp)
|
||||
if(vit->first == req.mPath.top())
|
||||
{
|
||||
req.mPath.pop();
|
||||
|
||||
//Just for GUI benefit
|
||||
std::string callbackName;
|
||||
req.mStream << makeKeyValueReference("callback_name", callbackName);
|
||||
resp.mCallbackName = callbackName;
|
||||
//
|
||||
|
||||
return vit->second->handleRequest(req, resp);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user