diff options
| author | Stefan Boberg <[email protected]> | 2021-10-14 19:07:14 +0200 |
|---|---|---|
| committer | GitHub <[email protected]> | 2021-10-14 19:07:14 +0200 |
| commit | 2b71d6a8d57c773bc7734b253a1ffd1e47162184 (patch) | |
| tree | c0c70f9f2f8b9dc895080aac9f7de1140c56ebf0 /zenhttp/include | |
| parent | Merge branch 'main' of https://github.com/EpicGames/zen (diff) | |
| download | zen-2b71d6a8d57c773bc7734b253a1ffd1e47162184.tar.xz zen-2b71d6a8d57c773bc7734b253a1ffd1e47162184.zip | |
asio HTTP implementation (#23)
asio-based HTTP implementation
Diffstat (limited to 'zenhttp/include')
| -rw-r--r-- | zenhttp/include/zenhttp/httpserver.h | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/zenhttp/include/zenhttp/httpserver.h b/zenhttp/include/zenhttp/httpserver.h index 3e6608f11..55bd08a8e 100644 --- a/zenhttp/include/zenhttp/httpserver.h +++ b/zenhttp/include/zenhttp/httpserver.h @@ -32,8 +32,8 @@ public: // Synchronous operations - [[nodiscard]] inline std::string_view RelativeUri() const { return m_UriUtf8; } // Returns URI without service prefix - [[nodiscard]] inline std::string_view QueryString() const { return m_QueryStringUtf8; } + [[nodiscard]] inline std::string_view RelativeUri() const { return m_Uri; } // Returns URI without service prefix + [[nodiscard]] inline std::string_view QueryString() const { return m_QueryString; } struct QueryParams { @@ -108,15 +108,15 @@ protected: kHaveSessionId = 1 << 3, }; - mutable uint32_t m_Flags = 0; - HttpVerb m_Verb = HttpVerb::kGet; - HttpContentType m_ContentType = HttpContentType::kBinary; - HttpContentType m_AcceptType = HttpContentType::kUnknownContentType; - uint64_t m_ContentLength = ~0ull; - ExtendableStringBuilder<128> m_UriUtf8; - ExtendableStringBuilder<128> m_QueryStringUtf8; - mutable uint32_t m_RequestId = ~uint32_t(0); - mutable Oid m_SessionId = Oid::Zero; + mutable uint32_t m_Flags = 0; + HttpVerb m_Verb = HttpVerb::kGet; + HttpContentType m_ContentType = HttpContentType::kBinary; + HttpContentType m_AcceptType = HttpContentType::kUnknownContentType; + uint64_t m_ContentLength = ~0ull; + std::string_view m_Uri; + std::string_view m_QueryString; + mutable uint32_t m_RequestId = ~uint32_t(0); + mutable Oid m_SessionId = Oid::Zero; inline void SetIsHandled() { m_Flags |= kIsHandled; } @@ -173,7 +173,7 @@ public: virtual void RequestExit() = 0; }; -Ref<HttpServer> CreateHttpServer(); +Ref<HttpServer> CreateHttpServer(std::string_view ServerClass); ////////////////////////////////////////////////////////////////////////// |