GoPxL SDK
GoRequest.h
Go to the documentation of this file.
1 
9 #ifndef GO_PXL_SDK_GOREQUEST_H
10 #define GO_PXL_SDK_GOREQUEST_H
11 
12 #include <GoPxLSdk/Def.h>
13 #include <GoPxLSdk/GoJson.h>
15 
16 class GoRequestTests;
17 
18 namespace GoPxLSdk
19 {
20 
22 {
23 public:
30  GoRequest() = default;
31 
40  GoRequest(GoRequestMethod method, const std::string& uri);
41 
51  GoRequest(GoRequestMethod method, const std::string& uri, const GoJson& content);
52 
63  GoRequest(GoRequestMethod method, const std::string& uri, const GoJson& content, const GoJson& args);
64 
71  k64u Id() const;
72 
79  GoRequestMethod Method() const;
80 
90  const std::string& Uri() const;
91 
98  const GoJson& Arguments() const;
99 
107  const GoJson& Content() const;
108 
109 
116  const ByteArray ToByteArray() const;
117 
118 private:
119  k64u id;
120 
122  std::string uri;
123  GoJson content = GoJson();
124  GoJson args = GoJson();
125 
126  static k64u nextId;
127 
128  friend class ::GoRequestTests;
129 };
130 
131 }
132 
133 #endif
Simplify working with json data.
Definition: GoJson.h:38
#define GoPxLSdkClass
Definition: Def.h:35
Definition: GoRequest.h:21
Declares the general SDK definitions.
std::vector< Byte > ByteArray
Definition: Def.h:49
Definition: GoRequestMethod.h:17
A Read request.
Definition: GoRequestMethod.h:23
Definition: Def.h:46