Skip to content

10-post-form: json parsing not required #14

@BartBucknill

Description

@BartBucknill

Working through this again just now I was slightly confused by the use of app.use(bodyParser.json()); as it does not actually do anything in this app. As the html form default encoding is application/x-www-form-urlencoded, only app.use(bodyParser.urlencoded({ extended: false })); is actually having an effect on the app.

I think that for clarity of understanding of FACers it might be better to remove app.use(bodyParser.json());, perhaps including a comment to the effect that body-parser has different methods for different data encoding.

Happy to do this myself.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions