Step I: Build your Service

The service at https://thedwarves.pusherplatform.io/api/dwarves returns details on dwarves in json format.

We would like you to help us make it more user-friendly by providing a facade for it.

Requirements

Write the service in a language suitable for the task (extra credit for writing it in Go).

It should respond to two types of HTTP requests:

Request:
GET /api/dwarves
# This should return just the names of all dwarves available from the backend as an array:

Response:
{
  "dwarves: [
    "Dwalin",
    "Balin",
    "Kili",
    "Fili"
  ]
}

---

Request:
GET /api/dwarves/Balin
# This should return the details provided by the backend for the selected Dwarf only

Response:
{
  "dwarf": {
    "name": "Balin",
    "birth": "TA 2989",
    "Death": "TA 2994",
    "culture": "Durin's Folk"
  }
}