Closed FoonkG closed 11 months ago
Thanks for the PR! I have a few questions about what the intended use is for when you ONLY set headers. Seems we can also simplify the handler logic (and need to simply injected new items for any intercepted resources). It will automatically match on the urls for you, so you're just providing the handler when it matches.
nice one, for sure better to return full response or some function handler
@blakebyrnes I didn't think the option for ONLY setting headers through. I only really need changing of the body for my issue and i thought adding the possibility for changing headers and statuscode would be an extra. I don't need this and so if it's quicker, i can remove the headers and statuscode part and leave it to somebody else. I need a release of this feature as soon as possible for my project.
@blakebyrnes Comitted the changes
Closes #236
Added ability to intercept certain requests by matching url (string | RegExp). Body, statusCode and headers can be manipulated.
Feature for #236