Book Image

Learning Single-page Web Application Development

Book Image

Learning Single-page Web Application Development

Overview of this book

Table of Contents (15 chapters)
Learning Single-page Web Application Development
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Testing the speakers' API routes


As we saw in the previous chapters, to include data on the API, we use Postman. Now, we will see another way to accomplish RESTful tests and how to insert data without being logged in.

This time, we will use the WebStorm IDE to test the RESTful API.

To trigger the RESTful tests panel, click on Tools and then on Test RESTful Web Service; this will activate the test panel.

With the panel enabled, let's insert some data, an HTTP method, a host, and a path, which in our case is /speakers.

First, we test the POST method. For this, we must fill some information in the Request Parameters pane, as shown in the following screenshot:

Note that the necessary credentials for this operation are on the Cookies tab, as shown in the following screenshot.

If you try to perform this same operation using Postman without being logged into the application, you will receive a message that says this User is not logged in.

This is very useful as you do not need to be logged in to perform...