Skip to content

proposal: net/http: add constant for content type #31572

@tomocy

Description

@tomocy

Is it a good idea to add constants for content type of HTTP body like http.MethodPost in HTTP methods?

It might be

const (
    ContentTypeFormURLEncoded = "application/x-www-form-urlencoded"
)

This changes will help us not typo, and get support from editors.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions