diff --git a/TMDbLib/Rest/RestRequest.cs b/TMDbLib/Rest/RestRequest.cs index 81784e7c..064bf1d9 100644 --- a/TMDbLib/Rest/RestRequest.cs +++ b/TMDbLib/Rest/RestRequest.cs @@ -159,7 +159,9 @@ private HttpRequestMessage PrepRequest(HttpMethod method) // Body if (method == HttpMethod.Post && _bodyObj != null) { - using MemoryStream ms = new MemoryStream(); +#pragma warning disable IDISP001 // Dispose created. => Stream is used in HttpContent + MemoryStream ms = new MemoryStream(); +#pragma warning restore IDISP001 // Dispose created. using (StreamWriter sw = new StreamWriter(ms, _client.Encoding, 4096, true)) using (JsonTextWriter tw = new JsonTextWriter(sw))