add async to rest client