sway: GET request fails content-type check
I got the following error when using a GET request which of course don’t have content…
{ code: 'INVALID_CONTENT_TYPE', message: 'Invalid Content-Type (application/octet-stream). These are supported: application/json' }
Work-around was to add ‘application/octet-stream’ in the consumes of the API. Is it a known issue?
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 2
- Comments: 17 (7 by maintainers)
What’s interesting is that a
GETrequest can have a body and so if aContent-Typeis present, it will be validated. We could potentially turn off validating theContent-Typeif there is no body whenever no request parameter isin: body.