Added http status codes to REST request handler.