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.
17 lines
703 B
17 lines
703 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_object(std::shared_ptr<HttpServer::Response> response);
|
||
|
|
static void bad_object(std::shared_ptr<HttpsServer::Response> response);
|
||
|
|
};
|