Full-Stack React Projects
上QQ阅读APP看书,第一时间看更新

Fetching a single user successfully

Using the token received after sign-in, we can now access the protected route that failed before. The token is set in the Authorization header in the Bearer scheme when making the GET request to /api/users/5a1c7ead1a692aa19c3e7b33, and this time the user object is returned successfully: