Permalink
Browse files

comment handleRequest

  • Loading branch information...
1 parent 7add598 commit e067cd601c7ee6a7cc99ede7ac04b712d7a04840 @MarcWeber MarcWeber committed Jul 22, 2009
Showing with 6 additions and 0 deletions.
  1. +6 −0 server/Scion/Server/Commands.hs
@@ -71,6 +71,12 @@ makeObject = makeObj
type KeepGoing = Bool
+-- a scion request is JS object with 3 keys:
+-- method: the method to be called
+-- params: arguments to be passed
+-- id : this value will be passed back to the client
+-- to identify a reply to a specific request
+-- asynchronous requests will be implemented in the future
handleRequest :: JSValue -> ScionM (JSValue, KeepGoing)
handleRequest (JSObject req) =
let request = do JSString method <- lookupKey req "method"

0 comments on commit e067cd6

Please sign in to comment.