From the course: Node.js: Securing RESTful APIs

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Test the API with Postman

Test the API with Postman

From the course: Node.js: Securing RESTful APIs

Start my 1-month free trial

Test the API with Postman

- [Instructor] Now let's go ahead and test our implementation and do it in Postman. So the first thing we're going to do is make sure our server is running so I'm going to do npm start. And if you see any error messages because you made some typos or there's something that's missing, read the console for the error messages and go back to those videos just to make sure. All right, so let's switch to Postman. So the first thing we're going to do is try to get the list of contacts without entering any token as if we're unauthorized. So let's go ahead and do that. So let's send for contacts and again, we are getting the unauthorized user. So that's normal behavior. The second thing we're going to do now is create a new user. So I'm going to change this it auth and register like so. And we need a few things when we register in the Body. So we need a username and if you're not sure, what you can do is go back…

Contents