Add necessary ObjectDisposedException to client

This commit is contained in:
Jordan Dominion
2023-11-06 17:44:45 -05:00
parent 549b65f03c
commit 72388f8035
+3
View File
@@ -482,6 +482,9 @@ namespace Tgstation.Server.Client
if (content == null && (method == HttpMethod.Post || method == HttpMethod.Put))
throw new InvalidOperationException("content cannot be null for POST or PUT!");
if (disposed)
throw new ObjectDisposedException(nameof(ApiClient));
HttpResponseMessage response;
var fullUri = new Uri(Url, route);
var serializerSettings = SerializerSettings;