You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

19 lines
852 B

5 years ago
#pragma once
#include <web_server.hpp>
const auto header_application_data =
std::make_pair("Content-Type", "application/json");
const auto header_access_control =
std::make_pair("Access-Control-Allow-Origin", "*");
class response {
public:
static void https_required(std::shared_ptr<HttpServer::Response> response);
static void https_required(std::shared_ptr<HttpsServer::Response> response);
static void bad_json(std::shared_ptr<HttpServer::Response> response);
static void bad_json(std::shared_ptr<HttpsServer::Response> response);
static void bad_request(std::shared_ptr<HttpServer::Response> response);
static void bad_request(std::shared_ptr<HttpsServer::Response> response);
static void not_found(std::shared_ptr<HttpServer::Response> response);
static void not_found(std::shared_ptr<HttpsServer::Response> response);
5 years ago
};