Skip to content

feat: expose the hijack resources to be able to handle the paused requests #1183

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

drake1588
Copy link

@drake1588 drake1588 commented Apr 29, 2025

The changes expose internal resources from the hijacking functionality to better handle paused requests:

  • Added Client() method to HijackRouter that returns the underlying proto.Client instance
  • Added Event() method to HijackRequest that returns the underlying FetchRequestPaused event

These additions allow external code to access the raw client and event instances, providing more flexibility when handling paused requests in custom implementations.

This allows the consumer to use ContinueResponse command from DevTools or use another request handling operations.

continueResponse := &protorod.FetchContinueResponse{
  RequestID: hijack.Request.Event().RequestID,
}
err = continueResponse.Call(router.Client())
if err != nil {
  return
}

Development guide

Link

Test on local before making the PR

go run ./lib/utils/simple-check

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant