accept method

void accept(
  1. Map<String, dynamic> options
)

Implementation

void accept(Map<String, dynamic> options) {
  List<dynamic> extraHeaders = Utils.cloneArray(options['extraHeaders']);
  String? body = options['body'];

  if (_direction != 'incoming') {
    throw Exceptions.NotSupportedError(
        '"accept" not supported for outgoing Message');
  }

  if (_is_replied != null) {
    throw AssertionError('incoming Message already replied');
  }

  _is_replied = true;
  _request.reply(200, null, extraHeaders, body);
}