Fix for 414 Error

Helper functions for both POST and GET were using request.get call. As a result POST was not being used for large messages causing "HTTP Error 414 Request URI too long" error.

Also modifies error handling, since the POST responses are now returned in JSON.