© Christopher Pitt 2018
Christopher PittThe Definitive Guide to AdonisJshttps://doi.org/10.1007/978-1-4842-3390-0_4

4. Requests

Christopher Pitt1 
Cape Town, Western Cape, South Africa

Now that we’re able to render HTML forms, it’s time to think about what we do with the data users send to us. In this chapter, we’re going to take a look at what makes a Request object, and how we extract data from each request.

It’s also a great opportunity for us to extend our tests to be able to make requests to the application and verify that the responses we get back represent the data we expect. That way, we’ll know the moment we break something that a browser is using.

Updating Tests

Since we added the markup in the previous chapter, the tests have been broken. ...

Get The Definitive Guide to AdonisJs: Building Node.js Applications with JavaScript now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.