addResponse method

bool addResponse(
  1. int id,
  2. HttpResponse response
)

Allows to add a response to an already added HttpInteraction, returns true on success.

This also notifies the listeners of this bucket.

Implementation

bool addResponse(int id, HttpResponse response) {
  var interaction = getHttpInteraction(id);
  if (interaction != null) {
    interaction.response = response;
    notifyListeners();
    return true;
  }
  return false;
}