I have an ASP.NET MVC website that calls a web API web service.
The calls work and return 200 OK - both web service calls on my local computer AND on the web server.
I have Fiddler, but it does not see these calls - only calls to the MVC website (which, in turn, calls the web service).
How can I see the actual calls to web services?
Should this work correctly? Especially for a web service on the Internet.
I stopped referring to http://localhost, and instead I use MACHINENAME - as recommended in some SO posts. But that does not help.
I use HttpClient to call it:
using (var client = new HttpClient())
{
var byteArray = Encoding.ASCII.GetBytes(username + ":" + password);
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Basic", Convert.ToBase64String(byteArray));
client.BaseAddress = new Uri("http://MACHINENAME");
client.DefaultRequestHeaders.Accept.Clear();
client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
var response = await client.PutAsJsonAsync("api/path", custImp);
}
How to view web service calls in Fiddler?
niico