Testing the /transaction endpoint

 Now let's head over to Postman and apply settings similar to the ones that we set earlier:

We have selected the POST request, and we are targeting the /transaction endpoint. In the Body tab, we have checked raw, and the text has been selected to JSON format. We have passed in the values for amount, sender, and recipient in the JSON object, which will be our req.body, and on this object we will send all of our transaction data. With the help of req.body, which was mentioned in our /transaction endpoint, we can access the amount, the address of the sender, and the recipient.

Now let's test this endpoint:

Get Learn Blockchain Programming with JavaScript now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.