RequestData.h 715 B

123456789101112131415161718192021222324252627282930
  1. //
  2. // Created by xcbosa on 2023/1/28.
  3. //
  4. #pragma once
  5. #include "utils-private.h"
  6. namespace xc {
  7. namespace utils {
  8. class RequestData {
  9. public:
  10. RequestData(string url, string method, map<string, string> headers, string body);
  11. string getURL() const;
  12. string getURLPath() const;
  13. string getURLArgument(string key) const;
  14. string getMethod() const;
  15. string getHeader(string name);
  16. string getBody() const;
  17. string getCookie(string key);
  18. private:
  19. string url;
  20. string method;
  21. map<string, string> headers;
  22. string body;
  23. };
  24. } // xc
  25. } // utils