Skip to content

Deprecate the old querystring in favor of URLSearchParams? #38231

Closed
@jimmywarting

Description

@jimmywarting

What do you think? should a warning be shown if someone is requiring the querystring?

  • URLSearchParams uses a more selective and fine grained approach to selecting encoded characters than that used by the Legacy API.
  • URLSearchParams is a spec standard, more ppl should know how it works
  • querystring is inconsistent when it comes to adding same keys more then once (by switching between string and arrays)
    • if your server depends on some key being used once ?key=val the you would expect that it would be a string
      But if someone where to add it twice ?key=val&key=val2 then it becomes an array and your application would do unexpected things.
  • works in more environments -> means fewer dependencies

Metadata

Metadata

Assignees

No one assigned

    Labels

    deprecationsIssues and PRs related to deprecations.querystringIssues and PRs related to the built-in querystring module.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions