call method

Future<HGrid> call(
  1. String op,
  2. HGrid req
)

/////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////// 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.

Implementation

// 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.
  Future<HGrid> call(String op, HGrid req) {
    return _postGrid(op, req).then((HGrid res) {
      if (res.isErr) throw CallErrError(res);
      return res;
    });
  }