curl -X GET http://localhost:3000/tasks \
-H "Authorization: Bearer YOUR_JWT_TOKEN"
[
{
"id": 1,
"title": "Complete API documentation",
"description": "Write comprehensive API docs for all task endpoints",
"completed": false,
"userId": 5
},
{
"id": 2,
"title": "Review pull requests",
"description": null,
"completed": true,
"userId": 5
}
]
Retrieve all tasks for the authenticated user
curl -X GET http://localhost:3000/tasks \
-H "Authorization: Bearer YOUR_JWT_TOKEN"
[
{
"id": 1,
"title": "Complete API documentation",
"description": "Write comprehensive API docs for all task endpoints",
"completed": false,
"userId": 5
},
{
"id": 2,
"title": "Review pull requests",
"description": null,
"completed": true,
"userId": 5
}
]
Authorization: Bearer YOUR_JWT_TOKEN
curl -X GET http://localhost:3000/tasks \
-H "Authorization: Bearer YOUR_JWT_TOKEN"
[
{
"id": 1,
"title": "Complete API documentation",
"description": "Write comprehensive API docs for all task endpoints",
"completed": false,
"userId": 5
},
{
"id": 2,
"title": "Review pull requests",
"description": null,
"completed": true,
"userId": 5
}
]