Skip to content

res.send should be not auto-coerce to application/json #1727

Open
@DonutEspresso

Description

@DonutEspresso
  • Used appropriate template for the issue type
  • Searched both open and closed issues for duplicates of this issue
  • Title adequately and concisely reflects the feature or the bug

Bug Report

When res.send is called, and a content-type is not explicitly set, application/json is chosen as the default content type if the first parameter received by send is a JS object. This behavior can be confusing (even more so when strictFormatters; false), and seems to be unnecessary given that res.json exists to do the same thing.

Something worth considering as we figure out how to decouple content negotiation from formatters moving forward.

cc @misterdjules

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions