Amended to conform to latest 'requests' library.