Once we run the program, the HTTP server will start locally listening on port 8080.
Next, we execute a GET request from the command line as:
$ curl -X GET http://localhost:8080/status API is up and running
It will give you the status of the API. Next we execute a GET request from the command line as:
$ curl -X GET http://localhost:8080/employees Required authorization token not found
It will display us the message that the JWT was not found in the request. So, to get the list of all the employees, we have to get the access token of the API, which we can get by executing the following command:
$ curl -X GET http://localhost:8080/get-token eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE1MTM1MTI2NTksImlzcyI6IlBhY2t0In0.2r_q_82erdOmt862ofluiMGr3O5x5_c0_sMyW7Pi5XE ...