Skip to content

docs: fix deprecated Buffer constructor and formatting issues in README#7371

Merged
jasonsaayman merged 2 commits intoaxios:v1.xfrom
mrsandy1965:mrsandy1965-readme-fix
Feb 5, 2026
Merged

docs: fix deprecated Buffer constructor and formatting issues in README#7371
jasonsaayman merged 2 commits intoaxios:v1.xfrom
mrsandy1965:mrsandy1965-readme-fix

Conversation

@mrsandy1965
Copy link
Contributor

@mrsandy1965 mrsandy1965 commented Feb 5, 2026

This pull request makes minor improvements to the README.md documentation. The changes update examples to use modern Node.js APIs and correct a small formatting issue.

  • Node.js API modernization:

    • Replaced usage of new Buffer() with Buffer.alloc() in code examples to follow current Node.js best practices and avoid deprecated APIs. [1] [2]
  • Documentation formatting:

    • Fixed a typo by adding a missing space after a comma in the URLSearchParams section for improved readability.

Summary by cubic

Modernize README examples by replacing deprecated new Buffer() with Buffer.alloc() and fix a small URLSearchParams formatting issue. This improves clarity and aligns docs with current Node.js practices.

Description

  • Changes: replace new Buffer() with Buffer.alloc() in two examples; fix spacing/link formatting in the URLSearchParams paragraph.
  • Reason: avoid deprecated APIs and improve readability.
  • Context: docs-only; no runtime or API changes.

Testing

  • No tests added or modified; not needed for a docs-only update.
  • Example snippets remain valid in supported Node versions.

Written for commit 7bf9887. Summary will update on new commits.

Copilot AI review requested due to automatic review settings February 5, 2026 14:08
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 1 file

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request updates the README.md documentation to modernize Node.js API usage and fix a minor formatting issue. The changes replace deprecated new Buffer() constructor calls with the modern Buffer.alloc() method, and correct spacing in the URLSearchParams section.

Changes:

  • Replaced two instances of deprecated new Buffer() with Buffer.alloc() in code examples
  • Fixed spacing after a comma in the URLSearchParams documentation section

@jasonsaayman jasonsaayman self-assigned this Feb 5, 2026
@jasonsaayman jasonsaayman added priority::low A low priority issue commit::docs The PR is related to docs labels Feb 5, 2026
Copy link
Member

@jasonsaayman jasonsaayman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🔥

@jasonsaayman jasonsaayman merged commit 265b712 into axios:v1.x Feb 5, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

commit::docs The PR is related to docs priority::low A low priority issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants