finished POST method for REST calls on hosts