Created
September 8, 2012 20:26
-
-
Save jrusbatch/3679448 to your computer and use it in GitHub Desktop.
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
/** | |
* Both of the below methods are valid actions in an ApiController, and both would result in the | |
* same response being sent to the client. | |
**/ | |
// GET api/strings | |
public IEnumerable<string> Get() | |
{ | |
return new string[] { "value1", "value2" }; | |
} | |
// GET api/strings | |
public HttpResponseMessage Get() | |
{ | |
return Request.CreateResponse(HttpStatusCode.OK, new[] { "value1", "value2" }); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment