您好想在拨打电话前记录http请求。有了所有的价值 - 用于开发目的。我的代码在
之下 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;
}
我无法弄清楚如何获得HttpRequestobject。有没有办法获得整个httpRequestObject?