So there is a 3rd party ajax call that takes ~5 mins for every request. So when debuggin on local machine, is there a way to simulate that ajax call like maybe store the response somewhere and load that as response every time that call is made to make debugging quicker.
I tried looking at the chrome inspector tool there is a way to resubmit an earlier ajax call, but I need the whole page load execution cycle so thats no use. There is also a way to save the response / or block the URL but no way to simulate/side load the ajax call with a local response saved in maybe a json file or something.
TlDR; Just like there is a way to block a certain URL, Is there a way to specify a certain URL to load local data insted of making the call to the endpoint.
I know software solutions are offtopic for SO, but since this question was unanswered for quite some time, and this functionality is not implemented yet in an browser, so here it goes.
I came across the Chrome Extension named : Mokku: Mock API calls seamlessly
This does seem to fulfil the expectations set.
Another option is to use a (reverse) proxy like charles proxy. Using it we can basically intercept the API calls and modify the response to whatever we want it to be, there is also an option to load a json file as response for any specific API call. It also accepts wildcards for URL matching. Pretty versatile IMHO.