Update rest adapter to return promises