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
Issue
process.binding() is for use by Node.js internal code only.
See: https://nodejs.org/api/deprecations.html#DEP0111
Fix
Use: _http_common
_http_common
const { methods, HTTPParser } = require("_http_common");
Example implementation in undici: https://github.com/nodejs/undici/pull/564/files
undici
Test equality
const assert = require("assert"); const { methods: deprecatedMethods, HTTPParser: deprecatedHTTPParser } = process.binding("http_parser"); const { methods, HTTPParser } = require("_http_common"); assert.deepStrictEqual(methods, deprecatedMethods); assert.strictEqual(methods, deprecatedMethods); assert.strictEqual( HTTPParser.kOnHeadersComplete, deprecatedHTTPParser.kOnHeadersComplete ); assert.strictEqual( HTTPParser.kOnMessageComplete, deprecatedHTTPParser.kOnMessageComplete ); assert.strictEqual(HTTPParser.kOnBody, deprecatedHTTPParser.kOnBody);
The text was updated successfully, but these errors were encountered:
Related:
Sorry, something went wrong.
Avoid using deprecated process.binding('http_parser')
e0c71a4
Refs: spdy-http2#6 Refs: https://nodejs.org/api/deprecations.html#DEP0111
Successfully merging a pull request may close this issue.
Issue
See: https://nodejs.org/api/deprecations.html#DEP0111
Fix
Use:
_http_common
Example implementation in
undici
:https://github.com/nodejs/undici/pull/564/files
Test equality
The text was updated successfully, but these errors were encountered: