curl -X PUT http://localhost:3000/tasks/1 \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_JWT_TOKEN" \
-d '{
"title": "Updated API documentation"
}'
{
"id": 1,
"title": "Finalized API documentation",
"description": "All endpoints documented and reviewed",
"completed": true,
"userId": 5
}
Update an existing task
curl -X PUT http://localhost:3000/tasks/1 \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_JWT_TOKEN" \
-d '{
"title": "Updated API documentation"
}'
{
"id": 1,
"title": "Finalized API documentation",
"description": "All endpoints documented and reviewed",
"completed": true,
"userId": 5
}
Authorization: Bearer YOUR_JWT_TOKEN
curl -X PUT http://localhost:3000/tasks/1 \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_JWT_TOKEN" \
-d '{
"title": "Updated API documentation"
}'
{
"id": 1,
"title": "Finalized API documentation",
"description": "All endpoints documented and reviewed",
"completed": true,
"userId": 5
}