Layout Rest Api actions
Server side:
Client side:
1. Rest Api vs. Ajax
2. Layout Rest Api example
JavaScript code
Layout Controller code
3. Request Authentication
3.1) Layout Controller: create and pass nonce to the template
3.2) Layout template: define nonce as a JavaScript variable
3.3) Layout JavaScript: use nonce in the request headers
Last updated