31 lines
605 B
C++
31 lines
605 B
C++
/*********************************/
|
|
/* */
|
|
/* o.riabenkyi@gmail.com */
|
|
/* */
|
|
/*********************************/
|
|
|
|
#ifndef RESPONSE_HPP
|
|
#define RESPONSE_HPP
|
|
|
|
#include <string>
|
|
#include <utility>
|
|
#include <vector>
|
|
|
|
#include "http/HttpStatus.hpp"
|
|
|
|
namespace webserv {
|
|
|
|
const char* reasonPhrase(HttpStatus status) noexcept;
|
|
|
|
struct Response {
|
|
HttpStatus status;
|
|
std::vector<std::pair<std::string, std::string>> headers;
|
|
std::vector<char> body;
|
|
};
|
|
|
|
std::vector<char> serialize(const Response& response);
|
|
|
|
} // namespace webserv
|
|
|
|
#endif
|