browsermob-proxy
browsermob-proxy copied to clipboard
Add possibility to remove RequestFilter
Hi, I would like to do something like this:
MyRequestFilter myRequestFilter = new MyRequestFilter();
proxy.addRequestFilter(myRequestFilter);
//do something using proxy with myRequestFilter
proxy.removeRequestFilter(myRequestFilter);
// do something using proxy without myRequestFilter
Can you add this functionality?
I think this is a great idea! It's slightly more complicated than you'd think, because of the way LittleProxy's filters and filter factories work. I've also considered perhaps having the addRequestFilter() method return a filter ID that can be used to disable or delete the filter later, which would be much friendlier for the REST API.
I think we'll probably get to this when we start modifying the REST API, which will most likely be part of the 2.2 release. In the meantime I'd be happy to entertain any PRs that work within the existing design!
Hi, first of all thank-you so much for building this awesome tool. I was wondering if this request got implemented? If yes, pardon my negligence. Thank you once again.
I don't think this feature has been implemented yet as I have not come across a way to do so via the api. Would anyone know of a work-around? Besides stopping/restarting the proxy.