[ ] Add efficient shims to fetch & websocket modules
[ ] Add receiveOutgoing & receiveIncoming methods; non-blocking event listeners to receive request data based on either a domain match or URL regex, does not tamper with request contents.
[ ] Add modifyOutgoing & modifyIncoming methods; blocking callbacks that allow for request modification or cancellation based on either a domain match or URL regex.
[ ] Add replace method; blocking callbacks that allow for manual handling of the request response based on either a domain match or URL regex (eg. Database endpoint -> native FFI call)
[ ] Add cleanup method; takes interceptor UIDs returned from established methods & removes them from the instance.
The idea here is to provide a better API than the current HTTPClientInterceptor system
Accessed through
MercuryContext.requests
fetch
&websocket
modulesreceiveOutgoing
&receiveIncoming
methods; non-blocking event listeners to receive request data based on either a domain match or URL regex, does not tamper with request contents.modifyOutgoing
&modifyIncoming
methods; blocking callbacks that allow for request modification or cancellation based on either a domain match or URL regex.replace
method; blocking callbacks that allow for manual handling of the request response based on either a domain match or URL regex (eg. Database endpoint -> native FFI call)cleanup
method; takes interceptor UIDs returned from established methods & removes them from the instance.The idea here is to provide a better API than the current HTTPClientInterceptor system