Am I able to add GET values to the URL in witty library, like: www.somewebsite.com?SomeSuperValue=12&other=something ?
I never tried but I think this might do it:
#include <Wt/WEnvironment>
const WEnvironment& env = WApplication::instance()->environment();
...
// read an application startup argument
// (passed as argument in the URL or POST'ed to the application).
if (!env.getParameterValues("login").empty())
{
std::string login = env.getParameterValues("login")[0];
}
you also have the WEnvironment& env as a parameter of the WApplication class overload, if you use c++.
EDIT: I just tested it and it works!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With