TurtleBrains  0.3.1
High quality, portable, C++ framework for rapid 2D game development.
tb_http_response.h
1 
9 #ifndef _TurtleBrains_HTTPResponse_h_
10 #define _TurtleBrains_HTTPResponse_h_
11 
12 #include "../../core/tb_configuration.h"
13 #if defined(tb_with_networking)
14 
15 #include "../../core/tb_types.h"
16 
17 namespace TurtleBrains
18 {
19  namespace Network
20  {
21  namespace Unstable
22  {
24 
25  namespace HTTP {
26  class Response
27  {
28  public:
29  explicit Response(const tbCore::int32 code = 0, const tbCore::tbString& body = tb_string(""));
30  Response(const Response& other);
31  ~Response(void);
32 
33 
34  bool IsValid(void) const;
35  operator bool() const { return IsValid(); }
36 
37  tbCore::int32 GetResponseCode(void) const;
38  const tbCore::tbString& GetResponseBody(void) const;
39 
40  Response& operator=(const Response& other);
41 
42  private:
43  tbCore::tbString mResponseBody;
44  tbCore::int32 mResponseCode;
45  };
46 
47  }; /* namespace HTTP */
48 
50  }; /* namespace Unstable */
51  }; /* namespace Network */
52 }; /* namespace TurtleBrains */
53 
55 
56 #endif /* tb_with_networking */
57 #endif /* _TurtleBrains_HTTPResponse_h_ */
Here is some information about the primary namespace.
Definition: tb_application_dialog.h:21
int32_t int32
Signed integer with a size of 32 bits. Supports values from -2147483648 to 2147483647.
Definition: tb_types.h:27
#define tb_string(object)
Definition: tb_string.h:28
std::string tbString
Definition: tb_string.h:335
Definition: tb_http_request.h:27