V7 onBodySent hook
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 7.7k
- Forks
- 880
- Avg merge
- 2d 16h
- Merged PRs (30d)
- 68
Description
I see onBodySent hook was removed here https://github.com/nodejs/undici/pull/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?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing PR #3878 and the V7 changes that removed the onBodySent hook. Trace the current request lifecycle to determine whether an equivalent extension point exists; done requires a decided approach for restoring or replacing the hook, with documented behavior and coverage for requests whose data has been sent.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, nodejs
- Domain
- networking
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100