Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create RequestInterceptor #15

Open
5 tasks
MulverineX opened this issue Apr 25, 2024 · 0 comments
Open
5 tasks

Create RequestInterceptor #15

MulverineX opened this issue Apr 25, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@MulverineX
Copy link
Collaborator

MulverineX commented Apr 25, 2024

Accessed through MercuryContext.requests

  • 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

@MulverineX MulverineX added the enhancement New feature or request label Apr 25, 2024
@MulverineX MulverineX self-assigned this Apr 25, 2024
@MulverineX MulverineX added this to the v0.2.0 milestone Apr 26, 2024
@MulverineX MulverineX modified the milestones: v0.2.0, v0.3.0 Jun 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant