diff options
| author | Stefan Boberg <[email protected]> | 2021-09-13 21:44:38 +0200 |
|---|---|---|
| committer | Stefan Boberg <[email protected]> | 2021-09-13 21:44:38 +0200 |
| commit | 55d2b7526ea4b75b8b1beff6c099b304a1916c4e (patch) | |
| tree | 1efe9a119f73496982ac6d75a0f357263309b895 /zenhttp/include | |
| parent | vcxproj change for adding httpcommon.h (diff) | |
| download | zen-55d2b7526ea4b75b8b1beff6c099b304a1916c4e.tar.xz zen-55d2b7526ea4b75b8b1beff6c099b304a1916c4e.zip | |
Added client implementation of CbPackage filter/transact
Diffstat (limited to 'zenhttp/include')
| -rw-r--r-- | zenhttp/include/zenhttp/httpclient.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/zenhttp/include/zenhttp/httpclient.h b/zenhttp/include/zenhttp/httpclient.h index 10829a58c..8975f6fe1 100644 --- a/zenhttp/include/zenhttp/httpclient.h +++ b/zenhttp/include/zenhttp/httpclient.h @@ -4,6 +4,9 @@ #include "zenhttp.h" +#include <zencore/iobuffer.h> +#include <zenhttp/httpcommon.h> + #include <zencore/windows.h> // For some reason, these don't seem to stick, so we disable the warnings @@ -27,7 +30,14 @@ public: HttpClient(std::string_view BaseUri); ~HttpClient(); - void TransactPackage(std::string_view Url, CbPackage Package); + struct Response + { + int StatusCode = 0; + IoBuffer ResponsePayload; + }; + + [[nodiscard]] Response TransactPackage(std::string_view Url, CbPackage Package); + [[nodiscard]] Response Delete(std::string_view Url); private: std::string m_BaseUri; |