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.
 
 
 

27 lines
571 B

  1. #pragma once
  2. #include "request.h"
  3. namespace cppmicrohttpd
  4. {
  5. request::request(
  6. MHD_Connection * const p_connection,
  7. const std::string& p_url,
  8. const std::string& p_method,
  9. const std::string& p_version)
  10. : connection(p_connection)
  11. , url (p_url)
  12. , method (p_method)
  13. , version (p_version)
  14. { }
  15. template<typename T_exception>
  16. void request::set_error(const T_exception& p_error)
  17. {
  18. if (!error)
  19. error.reset(new T_exception(p_error));
  20. }
  21. }