I have a JSON API in one blueprint module, and a web frontend in another one.
I would like to shave off a few AJAX requests the client JS code would have to make by embe
You can use a Flask test client for this:
client = app.test_client() response = client.get('/your/url', headers=list(request.headers))
To keep the authentication with Flask-Login you need to pass your request's headers.
Thanks to Chris McKinnel for answering a related question.