Found Requests library for python code and so I reimplemented post using it. The two methods are now interchangeable though the new version is cleaner and more intuitive