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.
Comments