In order to start utilizing the Ajax features of MooTools, let's take a few moments to discuss the Request class.
The Request class is MooTools' class for creating Request objects for dealing with Ajax-based HTTP server-side/client-side communication. With this class, you'll be able to easily send and retrieve data, as well as perform useful operations on these data.
To create a Request object, use the following format:
var requestObject = new Request(options);
The Request class is feature-packed; it has oodles of options for making your life as an Ajax developer much easier. Let's look at the options available to you.
In the following table, you will see the Request class options. You will see the option name, the data type that it accepts, its default value, and what it's for. We will use several of these throughout the chapter, so it would be ideal if you reviewed them now.
Request option |
Data type / Default value |
What it does |
---|---|---|
|
String... |