Display data from AJAX cross-domain request in Sinatra application
|Added at||2016-12-20 20:12|
I'm trying to develop some kind of bookmaker's site parser which grabs data from certain divs with Google Chrome extension written on JS (JQuery) and passes it via cross-domain AJAX GET request to Sinatra app deployed on localhost.
Here is the JQuery function. It works correctly and passes data to local https webserver.
Here is the main app code
So, I can see both in browser with bookmaker's website and in Ruby command prompt that AJAX works correctly and passes data to https://localhost/coefs. But how can I display and manipulate this data in Sinatra application? I don't want to write it immediately to database. Should I use websockets, sessions or cookies? What approach would be the best? Any help would be appreciated, thank you!