// Copyright (c) 2008-2023 the Urho3D project // License: MIT #pragma once #include "Sample.h" namespace Urho3D { class HttpRequest; class Text; } /// Http request example. /// This example demonstrates: /// - How to use Http request API class HttpRequestDemo : public Sample { URHO3D_OBJECT(HttpRequestDemo, Sample); public: /// Construct. explicit HttpRequestDemo(Context* context); /// Setup after engine initialization and before running the main loop. void Start() override; protected: /// Return XML patch instructions for screen joystick layout for a specific sample app, if any. String GetScreenJoystickPatchString() const override { return "" " " " " " " ""; } private: /// Create the user interface. void CreateUI(); /// Subscribe to application-wide logic update events. void SubscribeToEvents(); /// Handle the logic update event. void HandleUpdate(StringHash eventType, VariantMap& eventData); String message_; SharedPtr text_; SharedPtr httpRequest_; };