changed rest api to work with earlier versions of PHP

-deleted HTTPful rest client
-added curl for REST calls