|
- #pragma once
-
- #include "response.h"
- #include "../types.h"
-
- namespace cppmicrohttpd
- {
-
- /* response */
-
- response::response(const request_t& p_request)
- : request (p_request)
- , handle (nullptr, &MHD_destroy_response)
- { }
-
- void response::add_header(const char * key, const char * value)
- {
- if (MHD_add_response_header(handle.get(), key, value) != MHD_YES)
- throw exception(std::string("Unable to add header entry in response: ") + key + "=" + value);
- }
-
- }
|