Forum Discussion
Hi vitorlima1602,
Can you please clarify why you need the Content-Type header in a GET request? Content-Type is used in requests that have a request body, such as POST, PUT, or PATCH. GET requests are not supposed to have a body, this is explicitly disallowed in OpenAPI 3.0.
- vitorlima16024 years agoNew Contributor
Hi.
It is that in the company where I work, they adopted a standard of trafficking data through the header, including several GET methods are working like this, people test via postman and it works normally.
Now they want to use the swagger accessing the routes in the same way and I don't know how to do that.
- HKosova4 years agoSmartBear Alumni (Retired)
You can have header parameters, just not the ones named Content-Type or Accept - these headers are derived from request and response media types. Check out the Describing Parameters guide, it has some examples.
Related Content
- 3 years agoJislin
- 4 years agojodydowling
Recent Discussions
- 10 hours agonoob_Vibes