This is an asp.net webform website we are developing. In one xx.aspx.cs file, it gets web response from Google server.
var content = new FormUrlEncodedContent(recaptchaDetails);
var response = client.PostAsync("https://www.google.com/recaptcha/api/siteverify", content).Result;
var responseString = response.Content.ReadAsStringAsync().Result;
var obj = JsonConvert.DeserializeObject<RecaptchaResponse>(responseString);
Each time I debug this page in my local machine, Visual Studio fires up the IIS Express to run the server code. While IIS Express process the page, it takes very long time to load the response from Google in my local machine. It is not convenient for debugging.
Here is my thought on resolving this.
Change the code while debugging in my local machine. Change it to a mock returned object. But every time I commit the code, I have to roll back this block. There is risk that it may be commited to git server.
var response = new Xxx()
Use Fiddler to intercept this request to Google and return a file from disk.But each time before debugging, I have to open the fiddler.
Is there any Visual Studio plugin or IIS Express plugin to intercept the request to Google and directly return a response from disk file?