Fixed REST client failing on POST and 201 status code.

I'd suggest to name it `isSuccessCode` (to match RFC naming of 2xx block) and take `HTTPStatus` argument as opposed to raw `int`.