Current code
if (!(context.Exception is exception))
HttpContent requestContent = context.Request.Content;
string jsonContent = requestContent.ReadAsStringAsync().Result;
Jsoncontent
returns null here as well as
context.request = context.HttpRequestMessage
Seeing below output in local window
context.Request.Content.Headers {
Content-Length: 1458
Content-Type: application/json
}
Allow: {}
ContentDisposition: null
ContentEncoding: {}
ContentLanguage: {}
ContentLength: 1458
ContentLocation: null
ContentMD5: null
ContentRange: null
ContentType: { application/json }
Expires: null
LastModified: null
Results View: Expanding the Results View will enumerate the IEnumerable
context.Request.Content { System.Net.Http.StreamContent }
Headers: {
Content-Length: 1458
Content-Type: application/json
}
How do I retrieve content from header?