mirror of
https://github.com/Telecominfraproject/wlan-cloud-owls.git
synced 2026-03-20 03:40:28 +00:00
Using a proper random generator
This commit is contained in:
@@ -6,6 +6,9 @@
|
||||
#include "RESTObjects/RESTAPI_OWLSobjects.h"
|
||||
#include "StorageService.h"
|
||||
|
||||
#include "Poco/Net/HTTPCookie.h"
|
||||
#include "Poco/Net/NameValueCollection.h"
|
||||
|
||||
namespace OpenWifi {
|
||||
|
||||
static const std::vector<std::string> DefaultDeviceTypes{
|
||||
@@ -78,8 +81,22 @@ namespace OpenWifi {
|
||||
|
||||
void RESTAPI_simulation_handler::DoGet() {
|
||||
|
||||
Poco::Net::NameValueCollection Cookies;
|
||||
Request->getCookies(Cookies);
|
||||
|
||||
for(const auto &i:Cookies)
|
||||
std::cout << "Name: " << i.first << " Value: " << i.second << std::endl;
|
||||
|
||||
std::vector<OWLSObjects::SimulationDetails> Sims;
|
||||
StorageService()->SimulationDB().GetRecords(1,1000,Sims);
|
||||
|
||||
// try to add a cookie to see if it comes back.
|
||||
|
||||
Poco::Net::HTTPCookie Cookie("APITest", "This is a cookie");
|
||||
|
||||
Cookie.setMaxAge(-1);
|
||||
Response->addCookie(Cookie);
|
||||
|
||||
ReturnObject("list", Sims);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user