window.handler

This is a serverless platform for http requests. Open the dev console and define window.handler.

window.handler = function(request){
  
  return {
    'body': `Hello ${request.get.name}`
  }

}

You can access this function from the world wide web. Copied!

curl "https://windowhandler.com/?name=nolan"

See some more docs. And most importantly, have fun.

(If you have a usecase for this, I'd love to hear about it @jastrauss)

Request Events

{
  path: URL path - '/purple-eagle-123/subpath/'
  method: HTTP method - GET, POST, PATCH, PUT, DELETE
  get: GET Parameters map - {name: 'nolan'}
  body: POST body string
  headers: HTTP request headers map
}

Your Response

{
  body: Response body string or json
  status: HTTP Status Code (optional, default 200)
  headers: HTTP response headers map (optional)
}