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)

Most upvoted comments

What’s interesting is that a GET request can have a body and so if a Content-Type is present, it will be validated. We could potentially turn off validating the Content-Type if there is no body whenever no request parameter is in: body.