response method

void response(
  1. int id, {
  2. dynamic body,
})

Implementation

void response(int id, {body}) {
  var request = requests.value.firstWhereOrNull((n) => n.id == id);
  if (request != null) {
    request.watch.stop();

    request.response = body;

    requests.add(requests.value);
  }
}