DEV Community

Discussion on: How To Build Rest API With NodeJS, Express, and MySQL

Collapse
 
krishilmodi profile image
krishil-modi

Thanks Julia,
As per follow your above comment my API is working fine in GET method.

Request: localhost:3000/api/v1/users/id/1 ( Method GET )
Headers: Authorization (Key) : Bearer token

Response:
{
"id": 1,
"username": "krishil",
"first_name": "Darshan",
"last_name": "Modi",
"email": "darshanmodi2010@gmail.com",
"role": "SuperUser",
"age": 37
}

Thanks
Darshan Modi

Thread Thread
 
juliest88 profile image
Julia Strichash

I'm glad it worked!
You're welcome! :)