Jsonstore.io in HTML
ryanhcode (91)

I have used jsonstore.io before, and am now trying to integrate it into a web app. I can't use require, because I am running it inside of a script tag in HTML. How would I do this?

You are viewing a single comment. View All
Answered by JustARatherRidi (191) [earned 5 cycles]
View Answer
leon332157 (69)

You can use XmlHttpRequest to make requests to jsonstore in browser JS.

ryanhcode (91)

@leon332157 Thanks! I've never used that before so if anyone could give me pointers on that as well it would be nice.

heyitsmarcus (287)

@ryanhallihan The only problem you'll run into with jsonstore is CORS when running requests client side. You can initiate GET requests just fine, but you won't be able to POST, PUT, or PATCH any data back to the server without a server side implementation such as NodeJS.

Check out their GitHub page (in the JavaScript section) where there are sample requests: