NewRelicHttpClientRequest constructor

NewRelicHttpClientRequest(
  1. HttpClientRequest _httpClientRequest,
  2. int timestamp,
  3. Map<String, dynamic> traceData, [
  4. Map<String, dynamic>? params,
])

Implementation

NewRelicHttpClientRequest(
    this._httpClientRequest, this.timestamp, this.traceData,
    [this.params]) {
  var request = this;
  request.done.then((value) {
    var response = _wrapResponse(
      value,
      request,
      this.timestamp,
      this.traceData,
    );
    return response;
  }, onError: (dynamic err) {
    NewrelicMobile.instance.recordError(err, StackTrace.current);
    throw err;
  });
}