anthracite/lib/http/response.hpp
Nicholas Orlowsky 10ca7f9f51
Some checks failed
Docker Build & Publish / build (push) Failing after 1s
add turnaround time logging
2025-02-05 09:32:21 -05:00

30 lines
604 B
C++

#pragma once
#include <string>
#include <unordered_map>
#include "header_query.hpp"
namespace anthracite::http {
class response {
private:
int _status_code;
std::string* _content;
std::string _content_noref;
std::unordered_map<std::string, header> _headers;
public:
response();
int status_code();
void add_body(const std::string body);
void add_body_ref(std::string* body);
void add_status(int);
void add_header(header header, bool override_existing = true);
std::string& content();
std::string header_to_string();
std::string to_string();
};
};