Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not set request content-type for GET and HEAD request #1908

Closed
wants to merge 2 commits into from

Conversation

wuxu92
Copy link
Collaborator

@wuxu92 wuxu92 commented Dec 7, 2022

from importer tool logic, the content-type for GET/HEAD request is used for response content, should not use it in the request.

if strings.EqualFold(operation.httpMethod, "HEAD") || strings.EqualFold(operation.httpMethod, "GET") {
if len(operation.operation.Produces) > 0 {
contentType = operation.operation.Produces[0]
}
} else {
if len(operation.operation.Consumes) > 0 {

@manicminer manicminer self-assigned this Apr 3, 2023
@wuxu92 wuxu92 closed this May 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants