Calls the endpoint defined by the supplied uri.
Calls the endpoint defined by the supplied uri. Service.uri is removed from the beginning leaving the method name to be invoked on this service. The request is received as a JSON String that is extracted to call the method with arguments by name.
the complete uri
the JSON data as a String
the JSON response as a String
Init is called either the first
Registers this service and all its endpoints with the provided Website.
Registers this service and all its endpoints with the provided Website.
the website to register with
Service allows methods to be created in implementations that act as endpoints.
For example, if the Service uri is "/user" and you provide a method "create(name: String, phone: String)" then when the uri "/user/create" is invoked with JSON referencing "name" and "phone" the method will be invoked and the return will be converted to JSON as well.