November 2014
Intermediate to advanced
258 pages
5h 15m
English
Asynchronous JavaScript XMLHttpRequest (XHR), commonly known as Ajax, has become an important part of web applications over the last few years. With the advent of one-page applications and JavaScript application frameworks such as AngularJS, BackboneJS, and more, this technique of web development has risen exponentially.
Flask provides an easy way to handle the XHR requests in the view handlers. We can even have common methods for normal web requests and XHRs. We can just look for a flag on our request object to determine the type of call and act accordingly.
We will update the catalog application from the previous recipe to have a feature that will demonstrate XHR requests.
The Flask request
Read now
Unlock full access