Navigating Wordz Game with Microservice Architecture
Explore how to operate the Wordz game built with microservice architecture by starting the service, sending HTTP POST requests to begin a game, making guesses, and interpreting JSON responses. Understand how the game interacts with the database and handles game flow through web endpoints.
We'll cover the following...
To use our newly assembled web application, we first ensure that the database setup has been successfully completed. Then, we run the main() method of class WordzApplication. That starts the endpoint, ready to accept requests.
Starting a new game
Once the service is running, we interact with it by sending HTTP requests to the endpoint. We first need to start a game. To do that, we need to send HTTP POST requests to the /start route on our endpoint. By default, this will be available at http://localhost:8080/start. We need to send a body, containing the JSON {"name":"testuser"} text. We can send this request from the API widget. We click the “Create a request” button on the home page. This takes us to a view ...