commit method

Future<CommitResponse> commit(
  1. CommitRequest request
)

Commits a transaction, while optionally updating documents.

Throws a http.ClientException if there were problems communicating with the API service. Throws a ServiceException if the API method failed for any reason.

Implementation

Future<CommitResponse> commit(CommitRequest request) async {
  final url = _endPoint.replace(
    path: '/v1/${request.database}/documents:commit',
  );
  final response = await _client.post(url, body: request);
  return CommitResponse.fromJson(response);
}