I am trying to write a Chrome extension that reaches out to a MongoDB server and fetches some data. I am rather new to pretty much all the moving parts here so if any of my problems are ... duh ... I can handle the duh ... with the appropriate pointers to answers :)
First, I am rather frugal about using libraries on the client side, given that it is a browser extension and would rather not pack with it. Trying to stick to core/clean/basic JS (which I am willing to let go of given the right explanation).
MongoDB offers a rather primitive HTTP interface but if I can query it with curl and get meaningful data I expect it should be possible to do the same from a browser extension. After about two days of banging my head against the wall I finally discovered that Chrome is (rather silently) blocking my insecure XMLHttpRequest and wants that to be over HTTPS. I couldn't find anything about MongoDB handling HTTPS requests.
Q1: Is it possible to make an HTTP request against a MongoDB server? If yes, how? Q2: If Q1.answer is NO, how else can I come from a browser extension written in JS to a MongoDB server? The server hosting the website I am browsing is a different machine from the machine running the web browser, both different from the machine running the MongoDB server.
Thanks, Radu