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