added logging utility function
additions to get and send messages using http methods