I couldn't find any example of sending ajax request and getting response
component6 opened this issue · 1 comments
component6 commented
Good afternoon.
I couldn't find any example of sending ajax request and getting response
Could you describe an example of how to make a GET or POST request to aiohttp server (https://flexx.readthedocs.io/en/stable/examples/serve_with_aiohttp_src.html#serve-with-aiohttp-py)
We have a button:
- click on it
- a request is sent
- process the request, send the response (for example, content_type='application/json')
- get a response, redraw part of the application
Or is it fundamentally wrong? And is it done differently?
almarklein commented
You should probably use the Flexx event system, using actions and reactions. These can work accross the client-server boundary: https://flexx.readthedocs.io/en/stable/guide/event_system.html