Retrieve a Collection API endpoint uses request content-type instead of accept header #178
Describe the bug
When using the Retrieve a Collection API endpoint as documented here I notice that when sending a request with the
Upon looking at the source code I can see this bug is seemingly due to the following line: https://github.com/writeas/writefreely/blob/master/collections.go#L321
Steps to reproduce (if necessary)
Steps to reproduce the behavior:
The request is stating it accepts json the server should respond with content type json or HTTP 415 Unsupported Media Type if not supported. Given that the API supports returning JSON it should have responded with JSON.
The following line https://github.com/writeas/writefreely/blob/master/collections.go#L321 potentially needs amending to include the Accept header as well.
The text was updated successfully, but these errors were encountered: