Beispiel #1
0
        public HGrid call(string op, HGrid req)
        {
            HGrid res = postGrid(op, req);

            if (res.isErr())
            {
                throw new CallErrException(res);
            }
            return(res);
        }
        //////////////////////////////////////////////////////////////////////////
        // Call
        //////////////////////////////////////////////////////////////////////////

        /**
         * Make a call to the given operation.  The request grid is posted
         * to the URI "this.uri+op" and the response is parsed as a grid.
         * Raise CallNetworkException if there is a communication I/O error.
         * Raise CallErrException if there is a server side error and an error
         * grid is returned.
         */
        public async Task <HGrid> CallAsync(string op, HGrid req, string mimeType)
        {
            HGrid res = await PostGridAsync(op, req, mimeType);

            if (res.isErr())
            {
                throw new CallErrException(res);
            }
            return(res);
        }