Created
December 19, 2014 13:47
-
-
Save kelindar/f73fd0798ae810b5a7f9 to your computer and use it in GitHub Desktop.
Spike Engine: RESTful API Example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [Get("/random/{min}/{max}")] | |
| public static int Random(int min, int max) | |
| { | |
| return new Random().Next(min, max); | |
| } | |
| [Post("/hello")] | |
| public object Hello(string name) | |
| { | |
| return new | |
| { | |
| hello = "Hello, " + name + "!" | |
| }; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment