Challenge 1: Add the Delete Step — Possible Solution ==================================================================== #!/bin/bash # delete-task.sh curl -s -i -X DELETE "$BASE_URL/tasks/$1" \ -H "Authorization: Bearer $TOKEN" Used as: ./delete-task.sh WHY THIS WORKS AS AN ANSWER ------------------------------ This follows the exact same shape as create-task.sh: reading BASE_URL and TOKEN from the environment (never hardcoded, consistent with the whole script suite and this chapter's closing gotcha about drifting/ duplicated state), and using -X DELETE the same way Chapter 6 introduced explicit method flags. The task id to delete is taken as $1, the script's first command-line argument, the same pattern used for upload-avatar.sh in Chapter 7 — this makes the script reusable for ANY task id, rather than hardcoding one specific id that only works for whatever task happened to be created during testing. -i is included so the response status is visible in the output, confirming the deletion actually succeeded (e.g. a 204 No Content or 200 OK) rather than silently doing nothing if, say, the token had expired and the request actually failed with a 401.