Slide 11
Slide 11 text
DOUG NEINER
AJAX, AMPLIFY JS & JQUERY
REQUEST DEFINITION
// Typically used for ajax requests
amplify.request.define( resourceId, type, [ settings ] );
// Typically used for mocked requests, or local requests
amplify.request.define( resourceId, resource );
amplify.request.define( "customers.list", "ajax", {
url: "/customers/",
dataType: "json"
});
amplify.request.define( "customers.update", "ajax", {
url: "/customers/{id}",
dataType: "json",
method: "POST"
});