HttpInteraction constructor

HttpInteraction({
  1. required int id,
  2. Uri? uri,
  3. String? method,
  4. HttpRequest? request,
  5. HttpResponse? response,
  6. HttpError? error,
})

Creates a HttpInteraction.

Usually id is the hashCode of the original request object, for example HttpClientRequest.hashCode. This is used to be able to later update the interaction.

Implementation

HttpInteraction({
  required this.id,
  this.uri,
  this.method,
  this.request,
  this.response,
  this.error,
});