We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
According to the documentation the body mixin arrayBuffer() should return Promise, however it returns Promise.
References: https://github.com/nodejs/undici/blob/main/docs/api/Dispatcher.md#dispatcherrequestoptions-callback https://fetch.spec.whatwg.org/#body-mixin
❯ node Welcome to Node.js v18.18.0. Type ".help" for more information. > const undici = require('undici') undefined > const response = await undici.request("https://echo.free.beeceptor.com/") undefined > const buffer = await response.body.arrayBuffer(); undefined > typeof buffer 'object' > buffer instanceof ArrayBuffer false > buffer instanceof Uint8Array true > typeof buffer.buffer 'object' > buffer.buffer instanceof ArrayBuffer true >
Not sure if this is a bug or expected behaviour however the documentation should at least reflect this
Fedora 38 linux kernel 6.6.0-0.rc4 nodejs 18.18.0 undici@5.24.0
If this is a bug that has been present for a long time then fixing it may need to be classified as a breaking change
The text was updated successfully, but these errors were encountered:
Reproduced on undici@5.26.3
> let promiseBuffer = response.body.arrayBuffer() undefined > promiseBuffer Promise { Uint8Array(336) [ ... ], [Symbol(async_id_symbol)]: 1095, [Symbol(trigger_async_id_symbol)]: 6 } >
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
Bug Description
According to the documentation the body mixin arrayBuffer() should return Promise, however it returns Promise.
References:
https://github.com/nodejs/undici/blob/main/docs/api/Dispatcher.md#dispatcherrequestoptions-callback
https://fetch.spec.whatwg.org/#body-mixin
Reproducible By
Expected Behavior
Not sure if this is a bug or expected behaviour however the documentation should at least reflect this
Environment
Fedora 38
linux kernel 6.6.0-0.rc4
nodejs 18.18.0
undici@5.24.0
Additional context
If this is a bug that has been present for a long time then fixing it may need to be classified as a breaking change
The text was updated successfully, but these errors were encountered: