Exercise 1: GET REST API & Return Response Object
In this exercise, calculate two numbers through an API.
Requirements
The API should support the βGETβ method.
Numbers should be passed as a βQuery String.β
Return the result with the error code β200β in a JSON format:
{"result": "The result of Addition"}
To proceed with the exercise, follow the steps below in the solution.
Note that on encountering text like the following: {username}, replace it with your user initials.
Solution
The solution consists of the following steps:
Create API
Test API.
Last updated