format is not taken into account
Resource.__call__() has an argument format, that should be used to get the correct content type and add it to the headers when performing the request.
If you look at the code for Resource._request(), it set the accept header to the correct content type by executing serializer.get_content_type(). However, the value passed to format (which is stored in self._store['format']), is not passed to the get_content_type() function, which causes get_serializer() to return the default serializer. This in turn will cause the accept header to be set to the content type of the default serializer.
TL;DR:
- The
formatoption isn't used - The default format specified when creating the API object will always be used to set the
acceptheader (defaults to JSON).
@kspeeckaert greetings! We've made a fork and PR fixing this (but no tests covering this yet). But I don't know if this package is still maintained.
@samgiles can we reach you out?
Upd.: added test (I am not sure about styling though)