#pragma once #include #include #include namespace Spotify { struct CallbackResult { std::string code; std::string state; std::string error; }; class HttpCallbackServer { public: HttpCallbackServer(std::string host, uint16_t port, std::string path); // Wait for one callback request or timeout. Returns std::nullopt on // timeout. std::optional WaitForCallback(std::chrono::milliseconds timeout); private: std::string m_Host; uint16_t m_Port; std::string m_Path; }; } // namespace Spotify