Fix issue in check function

- Fix Rest::check() to use client check function.
Merge pull request #14 from xorti/master

Fix issue in check function