From 0af546c5b191a2f5498a1df4c4a97265712633a8 Mon Sep 17 00:00:00 2001 From: actually-akac <38866219+actually-akac@users.noreply.github.com> Date: Sat, 25 Nov 2023 15:16:50 +0100 Subject: [PATCH] Update the README file and fix a bug in Stream reading --- AbuseIPDB/Extensions.cs | 1 + AbuseIPDB/NuGet.md | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/AbuseIPDB/Extensions.cs b/AbuseIPDB/Extensions.cs index 345853f..ab45b48 100644 --- a/AbuseIPDB/Extensions.cs +++ b/AbuseIPDB/Extensions.cs @@ -67,6 +67,7 @@ public static async Task GetPreview(this HttpResponseMessage res) /// The HTTP response stream. public static async Task GetPreview(this Stream stream) { + stream.Position = 0; using StreamReader sr = new(stream); char[] buffer = new char[Math.Min(stream.Length, Constants.PreviewMaxLength)]; diff --git a/AbuseIPDB/NuGet.md b/AbuseIPDB/NuGet.md index 478ac65..7f68090 100644 --- a/AbuseIPDB/NuGet.md +++ b/AbuseIPDB/NuGet.md @@ -2,7 +2,7 @@ ![](https://raw.githubusercontent.com/actually-akac/AbuseIPDB/master/AbuseIPDB/icon.svg) -An async C# library for interacting with the v2 AbuseIPDB API. +### An async C# library for interacting with the v2 AbuseIPDB API. ## Usage This library provides an easy interface for interacting with the v2 AbuseIPDB API.