Hi Want to log http Request before making the call. With all the values - for dev purposes. My code is below
using (HttpClient hc = httpClient)
{
hc.BaseAddress = new Uri(endpoint);
hc.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
**// Want to Log the request here that captures Header and body content**
HttpResponseMessage response = hc.PostAsJsonAsync(url, bodyKeyValues).Result;
}
I am not to able to figure out how to get the HttpRequestobject. Is there a way to get the httpRequestObject as a whole?