Wrapping CURL; requests is not working as expected