Skip to content

Instantly share code, notes, and snippets.

@prestontimmons
Last active August 29, 2015 14:07
Show Gist options
  • Save prestontimmons/8676a7ad2cbdf3e7f086 to your computer and use it in GitHub Desktop.
Save prestontimmons/8676a7ad2cbdf3e7f086 to your computer and use it in GitHub Desktop.
import json
request = RequestFactory().post(
"/url/",
content_type="application/json",
data=json.dumps([1,2,3]),
)
# or
request = RequestFactory().post(
"/url/",
content_type="text/plain",
data=json.dumps([1,2,3]),
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment