convert socket posts/gets to rest service calls