src code

instance method Spah.StateServer#identifyStateFromRequest

Spah.StateServer#identifyStateFromRequest(delegateOrObject) → String, Object
  • delegateOrObject (Function
    REXML could not parse this XML/HTML: 
    <String, Object>, Object): Either a function to use as a delegate, or the object being checked using the delegate.

Tells Spah how to retrieve the State from an inbound client request, or identifies the State from an inbound client request. Retrieving a String or Object from the request is fine - if the delegate function returns a String it will be interpreted as JSON automatically.

When called with a function as the argument, sets the delegate function used by Spah to make this determination. When called with an object argument, passes the argument to the delegate function and returns the result.