static void apiServerSearchData(HttpRequest* req, HttpResponse* resp)
{
- if (req->method != "GET") {
- throw HttpMethodNotAllowedException();
- }
-
string qVar = req->getvars["q"];
if (qVar.empty()) {
throw ApiException("Query q can't be blank");
static void apiServerCacheFlush(HttpRequest* req, HttpResponse* resp)
{
- if (req->method != "PUT") {
- throw HttpMethodNotAllowedException();
- }
-
DNSName canon = apiNameToDNSName(req->getvars["domain"]);
bool subtree = req->getvars.count("subtree") > 0 && req->getvars["subtree"] == "true";
uint16_t qtype = 0xffff;
{"result", "Flushed cache."}});
}
-static void apiServerRPZStats(HttpRequest* req, HttpResponse* resp)
+static void apiServerRPZStats(HttpRequest* /* req */, HttpResponse* resp)
{
- if (req->method != "GET") {
- throw HttpMethodNotAllowedException();
- }
-
auto luaconf = g_luaconfs.getLocal();
auto numZones = luaconf->dfe.size();
{
static MetricDefinitionStorage s_metricDefinitions;
- if (req->method != "GET") {
- throw HttpMethodNotAllowedException();
- }
-
std::ostringstream output;
// Argument controls disabling of any stats. So