Skip to Content
Practical Internet of Things with JavaScript
book

Practical Internet of Things with JavaScript

by Arvind Ravulavaru
December 2017
Intermediate to advanced
296 pages
5h 56m
English
Packt Publishing
Content preview from Practical Internet of Things with JavaScript

API engine testing

To quickly check out the API that we have created, we will be using a Chrome extension named Postman. You can set up the Chrome extension from here: https://chrome.google.com/webstore/detail/postman/fhbjgbiflinjbdggehcddcbncdddomop?hl=en.

Once Postman is set up, we will be testing two API calls to validate the register and login methods.

Open Postman and enter the requested URL as http://localhost:9000/api/v1/users. Next, select the method type as POST. Once that is done, we will set the headers. Add a new header with key as content-type and value as application/json.

Now we will construct the request body/payload. Click on the Body tab, next to Headers, and select Raw request. And update it with the following:

{ "email" ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Test-Driving JavaScript Applications

Test-Driving JavaScript Applications

Venkat Subramaniam
Web Caching and Replication

Web Caching and Replication

Michael Rabinovich, Oliver Spatscheck

Publisher Resources

ISBN: 9781788292948Supplemental Content