Make sure request succeeds before trying to decode body as json
Merge pull request #107 from p-push/extra-assert

Make sure request succeeds before trying to decode body as json
Test program for duplicating sockets in windows
Reproduce case for crash in dup() on windows
Use wsaduplicatesocket instead of dup on windows to avoid crashes.

http://curl.haxx.se/mail/curlpython-2013-12/0012.html

Reported by Gisle Vanem.