GoPxL SDK

- Home
- Files
- Namespace

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>
14 #include <GoPxLSdk/GoRequestMethod.h>
15
16 class GoRequestTests;
17
18 namespace GoPxLSdk
19 {
20
21 class GoPxLSdkClass GoRequest
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
121 GoRequestMethod method = GoRequestMethod::Read;
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
GoPxLSdk::GoJson
Simplify working with json data.
Definition: GoJson.h:38
GoPxLSdkClass
#define GoPxLSdkClass
Definition: Def.h:35
GoPxLSdk::GoRequest
Definition: GoRequest.h:21
Def.h
Declares the general SDK definitions.
GoJson.h
GoRequestMethod.h
GoPxLSdk::ByteArray
std::vector< Byte > ByteArray
Definition: Def.h:49
GoPxLSdk::GoRequestMethod
Definition: GoRequestMethod.h:17
GoPxLSdk::GoRequestMethod::Read
A Read request.
Definition: GoRequestMethod.h:23
GoPxLSdk
Definition: Def.h:46