Skip to content

Instantly share code, notes, and snippets.

@tomchristie
Created February 9, 2016 14:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tomchristie/ffea25f557402e0ea23e to your computer and use it in GitHub Desktop.
Save tomchristie/ffea25f557402e0ea23e to your computer and use it in GitHub Desktop.
response = requests.get('http://api.example.com')
content_type = response.headers.get('content-type')
codec = coreapi.negotiate_decoder(content_type, decoders=decoders)
doc = codec.load(response.content)
.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment