Skip to main content

Posts

Showing posts with the label JavaScript

Using Fiddler to mock web responses

Introduction I recently had a need to debug an issue that a customer was having, but it seemed as though it was related to their data. I had two options, take a copy of their data and configuration files and set them up in my development environment, or find another way. "The Other Way" What I really needed to be able to do was to return specific responses to certain requests, but allow other requests to go through unhindered, thus spoofing the client into believing I had the customer's data set up. That's when I remembered that Telerik Fiddler can be used as a proxy and has something called an AutoResponder which sounds like it could do what I wanted. AutoResponder The way the AutoResponder works is by matching the URL with a known string, and then performing an action if it matches (see the AutoResponder documentation for more info). This could be as simple as returning the response from a file, setting a header, or performing a redirect. The benefit...