Hi,

Unfortunately at the moment, you’ll have to perform the call to json.dumps, 
drop the format and use content-type to set the version.

Regards,
Xavier Ordoquy,
Linovia.

> Le 5 avr. 2017 à 11:09, Tobias Zanke <[email protected]> a écrit :
> 
> I am using the AcceptHeaderVersioning and like to write some tests. At the 
> moment i do it this way:
> 
> 
> 
> .put(url, **{'HTTP_ACCEPT': 'application/json; version=1'})
> 
> 
> 
> But i would like to write the code like this
> 
> 
> 
> .put(url, format='json', version='1')
> 
> 
> 
> Whats the correct way atm? I could not find anything related to testing a 
> AcceptHeaderVersioning API
> 
> 
> 
> Best Regards
> 
> Tobias
> 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Django REST framework" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected] 
> <mailto:[email protected]>.
> For more options, visit https://groups.google.com/d/optout 
> <https://groups.google.com/d/optout>.

-- 
You received this message because you are subscribed to the Google Groups 
"Django REST framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to