httptoolkit / mockttp

Powerful friendly HTTP mock server & proxy library
https://httptoolkit.com
Apache License 2.0
775 stars 88 forks source link

request object on beforeResponse hook #147

Closed vikasg603 closed 1 year ago

vikasg603 commented 1 year ago

Hey team, is there any way to find out what was the request when looking for beforeResponse hook? Currently, I see we get only a response object but I guess adding a conditional response based on the request will be a much better idea

pimterry commented 1 year ago

Hi @vikasg603, see https://github.com/httptoolkit/mockttp/issues/80. In summary: right now that's not available, but it's a good idea and PRs to add it are very welcome. I'm going to close this as a duplicate, but discussion over there is very welcome if you're interested in working on this.

vikasg603 commented 1 year ago

Hey @pimterry I understand where the pain is. Let me see on weekends if I can help solve this from my end.