internal HitMalformedEventArgs(Hit hit, int httpStatusCode) { HttpStatusCode = httpStatusCode; Hit = hit; }
internal HitSentEventArgs(Hit hit, string response) { Response = response; Hit = hit; }
internal HitFailedEventArgs(Hit hit, Exception error) { Error = error; Hit = hit; }
async Task OnHitSentAsync(Hit hit, HttpResponseMessage response) { HitSent?.Invoke(this, new HitSentEventArgs(hit, await response.Content.ReadAsStringAsync())); }
void OnHitFailed(Hit hit, Exception exception) { HitFailed?.Invoke(this, new HitFailedEventArgs(hit, exception)); }
void OnHitMalformed(Hit hit, HttpResponseMessage response) { HitMalformed?.Invoke(this, new HitMalformedEventArgs(hit, (int)response.StatusCode)); }