Making authenticated HTTP PATCH requests with Postman
Now, we will use one of the GUI tools we installed in Chapter 1, Installing the Required Software and Tools, specifically, Postman. We will use this GUI tool to compose and send an HTTP PATCH
request with the appropriate authentication credentials to the web service. In the previous chapters, whenever we worked with Postman, we didn't specify authentication credentials.
We will use the Builder
tab in Postman to compose and send an HTTP PATCH
request to update the has_it_competed
field for the previously created drone. Follow these steps:
- In case you made previous requests with Postman, click on the plus (+) button at the right-hand side of the tab that displayed the previous request. This way, you will create a new tab.
- Select
PATCH
in the drop-down menu at the left-hand side of theEnter request URL
textbox. - Enter
http://localhost:8000/drones/12
in that textbox at the right-hand side of the drop-down. Replace12
with the ID generated for...