15.1: Test Getting Notes in Postman
Last updated
Last updated
Run the API project.
Open Postman.
Click on the + to create new request.
Set it to GET.
Make sure the URL is the same as the URL running the API.
At the end of the URL add /api/note. (or whatever your api endpoint is)
Click on the Headers tab.
Add a key called Authorization.
Add a value starting with Bearer.
Go to the first request tab and copy the token from that previous request without the quotation marks.
Type a space after Bearer and then paste the token. (PLEASE Note that the image below has an error. It should say GET and not POST.) Also notice that the word Bearer is there before the token.
Press Send.
You should see a list of notes(or whatever) for your particular account (make sure the account you are using has some notes)
Stop the app
Next, we'll add the Http methods in the NoteController
.