17.2: Test Post
Last updated
Last updated
Post
MethodIn this section, we'll test posting a new note to the database and then retrieving it.
Change the URL to api/Note
Change GET to POST
In order to test that data will post, we need to add data in the Body of our request
Click on the Body tab and check urlencoded
Enter in the Keys and Values as below
Make sure to use a NoteId
that isn't already being used in your database
Press Send and you should get a success
Test that this worked by running a GET request with the end of the URL api/Note/X
X is the NoteId
you used
You should see your note in the response
Next, we'll test the Update
method.