Last active
August 1, 2016 17:52
-
-
Save Auronmatrix/d25aed98364ed7a3ab673a4699427a42 to your computer and use it in GitHub Desktop.
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 async Task<HttpResponseMessage> Post(string name) | |
{ | |
var response = "Success!"; | |
var httpResponse = new HttpResponseMessage(HttpStatusCode.OK); | |
httpResponse.Headers.ConnectionClose = true; | |
string body = Request.Content.ReadAsStringAsync().Result; | |
// Do your thing with the body content | |
// Update the response | |
httpResponse.Content = new StringContent(response); | |
return httpResponse; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment