consuming restful apis