web_response.h
1 
2 #pragma once
3 
4 #include "../api_network.h"
5 #include <memory>
6 
7 namespace clan
8 {
9 
10 class DataBuffer;
11 class IODevice;
12 class WebResponse_Impl;
13 
15 class CL_API_NETWORK WebResponse
16 {
17 public:
18  WebResponse();
19 
20  int get_status_code();
21  std::string get_status_string();
22 
23  bool has_header_field(const std::string &name);
24  std::string get_header_field(const std::string &name);
25 
26  bool has_content_type();
27  std::string get_content_type();
28 
29  DataBuffer get_body();
30  std::string get_body_string();
31  // IODevice get_body_reader();
32 
33 private:
34  std::shared_ptr<WebResponse_Impl> impl;
35  friend class WebRequest;
36 };
37 
38 }
HTTP web response class.
Definition: web_response.h:15
General purpose data buffer.
Definition: databuffer.h:43
HTTP web request class.
Definition: web_request.h:16