An example REST Server

The RESTProcessExample directory has an example CLI application that takes a REST endpoint, and arguments expressed in JSON to call methods or attribute setter/getters.

An example HTTP REST server can be found in the Minsky project. Here, the slash-separated PATH string is passed as the method name (with slashes replaced by dots), and the HTTP message body is passed as a JSON string to the the arguments argument. The return value is converted to a JSON string and returned as the response.

Note the HTTP verb is essentially ignored. Essentially if the message body is empty, the request is considered a GET, if it contains JSON data, then the request is considered as a PUT or POST.