-
Notifications
You must be signed in to change notification settings - Fork 1
Simple HTTP Api
Donald Mull Jr edited this page Sep 23, 2013
·
5 revisions
Same as `GET /index.html'
Return file contents (for included scripts, styles, alternate layouts, etc).
The server responds with the appropriate Content-Type and the body. No length need be specified.
Example:
HTTP/1.1 200 OK
Content-Type: text/html
<!DOCTYPE html>
<html>
....
</html>
Supported Types / Extensions
-
.html
:Content-Type: text/html
-
.css
:Content-Type: text/css
-
.js
:Content-Type: text/javscript
Return the draw script to catch up since the last time this was requested.
Informs server of a client event (e.g. 'click'). Arguments come in the body encoded in application/x-www-form-urlencoded
(like url query params).
The server responds to all well-formed events with
HTTP/1.1 200 OK
POST /events/click
: x=0&y=0
POST /events/rightclick
: x=0&y=0