Created
March 15, 2013 04:23
-
-
Save erikdietrich/5167466 to your computer and use it in GitHub Desktop.
This is the default controller created by Web API.
This file contains 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
public class ValuesController : ApiController | |
{ | |
// GET api/values | |
public IEnumerable<string> Get() | |
{ | |
return new string[] { "value1", "value2" }; | |
} | |
// GET api/values/5 | |
public string Get(int id) | |
{ | |
return "value"; | |
} | |
// POST api/values | |
public void Post([FromBody]string value) | |
{ | |
} | |
// PUT api/values/5 | |
public void Put(int id, [FromBody]string value) | |
{ | |
} | |
// DELETE api/values/5 | |
public void Delete(int id) | |
{ | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment