#pragma once #include #include #include #include class HttpSession; struct HttpResult { std::string url; int operationId = 0; int status = 0; int size = 0; int progress = 0; // from 0 to 100 int redirects = 0; // redirect bool connected = false; bool finished = false; bool canceled = false; std::string postData; std::vector response; std::string error; std::weak_ptr session; }; using HttpResult_ptr = std::shared_ptr; using HttpResult_cb = std::function;