Created
July 2, 2021 15:45
-
-
Save bjoerntx/2ddbadeaa036c42db125c62a19b62340 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
[HttpPost] | |
public IActionResult FormValues(string Username) { | |
// read stream to retrieve form field values | |
Stream inputStream = Request.Body; | |
FormField[] fields; | |
StreamReader str = new StreamReader(inputStream); | |
string sBuf = str.ReadToEndAsync().Result; | |
fields = (FormField[])JsonConvert.DeserializeObject(sBuf, typeof(FormField[])); | |
// write the values | |
DeploymentHelpers.WriteValue(Username, fields); | |
return Ok(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment