Don't set the content-type when there is no payload #325
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi,
I can't use the Mock Web Server https://github.com/stoplightio/prism because the GET operations set a content-type & content-length in the http headers. I think it's an error. a content-type & content-length must be set when there is a payload with operations like 'PUT' or 'POST'...
Web server like https://github.com/stoplightio/prism (mock of openapi) rejects the calls because it validate the request and a content-type has nothing to do with GET operations.
Exemple of a call made by openapi-to-graphql to my openapi web server:
GET http://127.0.0.1:4010/RESTMethod HTTP/1.1
content-type: application/json (bad)
accept: application/json
host: 127.0.0.1:4010
content-length: 0 (bad)
Connection: close