Skip to content

Should default to consumes[0] if no requestContentType provided #995

@ponelat

Description

@ponelat

The final order of setting the Content-Type header should be as follows..

  • if has no req.body, no req.form add nothing.
  • else if requestContentType, use that.
  • else if has consumes use consumes[0]
  • else if has a "type: file" parameter use multipart/form-data
  • else if has "in: formData" use application/x-www-form-urlencoded
  • else add nothing.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions