aboutsummaryrefslogtreecommitdiffstats
path: root/http_response.h
blob: f0acd9ed169d8a4bcd726df7fc1426654b4d7f76 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#pragma once
#include <string>
#include <unordered_map>

namespace flask
{
    struct response
    {
        std::string body;
        int code{200};
        std::unordered_map<std::string, std::string> headers;
        response() {}
        explicit response(int code) : code(code) {}
        response(std::string body) : body(std::move(body)) {}
        response(int code, std::string body) : body(std::move(body)), code(code) {}
    };
}