Upgrading requests from 1.2.3 to 2.2.1

Also changes some mocking of requests in tests due to upstream changes.