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

V7 onBodySent hook #3884

Open
artur-ma opened this issue Nov 26, 2024 · 1 comment
Open

V7 onBodySent hook #3884

artur-ma opened this issue Nov 26, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@artur-ma
Copy link
Contributor

artur-ma commented Nov 26, 2024

I see onBodySent hook was removed here #3878

We use the onBodySent hook, we use it to "await" the request until the data was sent on the socket, then we just resolve the promise while handling the request in the background, with some fallback to queue in case request fails.

This is useful if u have to make sure data transfer completed, and u assume that in most of the cases it will be handled successfully(with some fallback if not), and we do not really care on awaiting data processing on the other side.
Looks like it is impossible to implement it now in V7.

Is it removed completely or there are plans to bing it back at some point?

@artur-ma artur-ma added the enhancement New feature or request label Nov 26, 2024
@ronag
Copy link
Member

ronag commented Nov 26, 2024

There is some plans to add request hooks. But nothing I have time to look into atm. You can achieve the same behavior by wrapping the body in a stream and waiting for the 'end' event.

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

2 participants