Actually I found the problem it wasn't related to the *Content-type* or the
*Accept* headers. BTW--the *format='json'* argument generates the
*Content-Type* header.
The problem had to do with the fact that I rewrote the *ContentNegotiation*
class and there was a bug in it.
Thanks for your comment,
Hi Carl,
I think you are using the wrong header in your request, try to use:
"Content-Type": "application/json"
Best Regards,
José Valdivia
Carl Nobile schrieb am Sa., 30. Nov. 2019, 19:15:
> I'm trying to run my unit tests using JSON however I'm getting this error:
>
> {'detail': ErrorDetail
I'm trying to run my unit tests using JSON however I'm getting this error:
{'detail': ErrorDetail(string='XML parse error - not well-formed (invalid
token): line 1, column 0', code='parse_error')}
My settings are:
REST_FRAMEWORK = {
...
'DEFAULT_PARSER_CLASSES': (
'rest_framewo