Configuring and Testing HTTP Endpoints

Learn the essential steps to kickstart new games within our web application by focusing on test-driving a web adapter to provide our domain model with an HTTP API, allowing external clients to trigger actions and play the game.

In this lesson, we’ll test-drive a web adapter that will provide our domain model with an HTTP API. External web clients will be able to send HTTP requests to this endpoint to trigger actions in our domain model so that we can play the game. The API will return appropriate HTTP responses, indicating the score for the submitted guess and reporting when the game is over.

Press + to interact
Clients communicating with the Wordz application through web endpoint
Clients communicating with the Wordz application through web endpoint

The following open-source libraries will be used to help us write the code:

  • Molecule: This is a lightweight HTTP framework.

  • Undertow: This is a lightweight HTTP web server that powers the Molecule framework.

  • GSON: This is a Google library that converts between Java objects and ...

Get hands-on with 1400+ tech skills courses.