Appscript Webapps, JSON and CORS

Welcome to the matrix

With a couple of clicks, Appscript gives you a webserver including https certificate: for free! Seriously? Does that mean I can push json-data into a spreadsheet (using appscript)? Yes! Just make sure you'll follow the CORS / authentication-logic below. CORS caveats Before you do your happy-dance (which you should), please understand appscript + CORS comes with a few exceptions: GET requests: mostly yes POST request: it depends PUT/DELETE/OPTIONS: nope Depends on what? [Read More]

Tip: use an eventbus

Release the busdriver inside you

Here are some tips to organize your apscript-code using an eventbus. It separates hardcoding from softcoding. Why would i want this? Stability The more code we add, the more we want to be careful right? Other reasons are: hotplugging of features keep functions tiny intercepting or extending existing features more control over importing code in appscript Hello appscript eventbus. var eventbus = function(o){ o.events = {} o. [Read More]

Webapps and anonymous JSON-endpoints

Is this JSON Anonymous?

In the previous post we explained how appscript gives you a webserver including https certificate: for free! Anynomous endpoints If you want other webservices to connect to your appscript, you'll want anonymous access (see settings in Publish > Deploy as webapp) The following matrix applies now: webrequest Anonymous webrequest CORS application/json application/javascript text/xml text/plain text/html GET /exec?path=/foo ✓ ✓ ✓ ✓ ✓ ✓ ⚠ POST /exec? [Read More]

Webapps and authenticated JSON-endpoints

Time for introspection, Who am I?

In the previous post we explained how appscript gives you anonymous CORS+JSON endpoints: for free! Anynomous endpoints If you want other webservices to connect to your appscript, you'll want anonymous access (see settings in Publish > Deploy as webapp) The following matrix applies now: webrequest Anonymous webrequest CORS application/json application/javascript text/xml text/plain text/html GET /exec?path=/foo ✓ ✓ ✓ ✓ ✓ ✓ ⚠ POST /exec? [Read More]