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.