I have access to a Response
object in my python backend for returning HTML pages, etc. I can declare headers, content-type, etc.
Instead of re-engineering the Python to use something like Django/Flask (which would allow me to parse JSON data on the backend and stick in right on the page), could I do something like add an arbitrary response header key to hold my initial JSON that needs to load on the page, then parse that JSON with my AngularJS? Or is this bad practice /a lazy & dirty hack?
The HTML Page I return contains all the necessary tags to call JS that makes the app run and do Ajax requests as the user interacts with the app, but I really would like to pass on JSON during the initial load without rebuilding how our Python serves HTML files / templates.