Skip to content

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