HTTP Body JSON

{
  "Name": "john doe"
}
string requestBody = await new StreamReader(req.Body).ReadToEndAsync();

dynamic data = JsonConvert.DeserializeObject(requestBody);

string strName = data.Name;

Note:

  • Case sensitive.
  • When passing in an object from another app, sometimes it will make the first letter of the attribute name lower case.
Last modified: March 30, 2021

Author

Comments

Write a Reply or Comment