Definition of mock web API server using custom .wad file
.wad file contains definiton of your API
-port 3000
GET "/api/hello"
-response
{"message": "hello"}
GET "/api/world"
-response "world"
- Creates localhost http server on port 3000
- Creates
HTTP GET
enpoint/api/hello
which returnsapplication/json
data
{
"message": "hello"
}
- Creates
HTTP GET
endpoint/api/world
which returns stringworld
astext/plain
- Responds to every other request with
404 page not found