Skip to content

Commit f676e47

Browse files
Lionel SchiepersAlan-Cha
authored andcommitted
Don't set the content-type when there is no payload
The HTTP Get operation actually set a content-type of 'application/json' when there is no payload. The request adds a content-length of 0 because there is no payload. Web server like https://github.com/stoplightio/prism (mock of openapi) reject the calls because the content-type has nothing to do with GET operations. Exemple: GET http://127.0.0.1:4010/RESTMethod HTTP/1.1 content-type: application/json accept: application/json host: 127.0.0.1:4010 content-length: 0 Connection: close Signed-off-by: Lionel Schiepers <[email protected]>
1 parent ccae884 commit f676e47

File tree

3 files changed

+17
-11
lines changed

3 files changed

+17
-11
lines changed

packages/openapi-to-graphql/lib/resolver_builder.js

Lines changed: 7 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)