You saved my day again and again. Thank you very much :)
btw, where can I find more info about validation? :)
Thanks again :)
On Sat, 02 May 2015 16:47:44 GMT, Sönke Ludwig wrote:
What about this?
{ "credential": { "username": "Dato", "password": "asd" } }
BTW, you can drop most of the attributes, as those are the defaults anyway:
@rootPathFromName interface IWeb { // POST /authenticate {"credential": ...} string authenticate(Credential credential); }
To get the first POST body to work (
{"username": "Dato", "password": "asd"}
), you could usestring authenticate(string username, string password);
- orstring authenticate(ValidUsername username, ValidPassword password);
to get some automatic input validation.