Browse Source

Patched TestRestClient for compatibility with newest version.

(pre-fetch cleanup)
pull/62/head
Christopher F 9 years ago
parent
commit
fa5f79eac2
1 changed files with 4 additions and 2 deletions
  1. +4
    -2
      test/Discord.Net.Tests/Rest/Framework/TestRestClient.cs

+ 4
- 2
test/Discord.Net.Tests/Rest/Framework/TestRestClient.cs View File

@@ -19,13 +19,15 @@ namespace Discord.Tests.Rest


} }


Task<Stream> IRestClient.Send(string method, string endpoint, IReadOnlyDictionary<string, object> multipartParams)
Task<Stream> IRestClient.Send(string method, string endpoint, IReadOnlyDictionary<string, object> multipartParams, bool headerOnly = false)
{ {
if (headerOnly) return null;
throw new NotImplementedException("method only used for SendFile, not concerned with that yet."); throw new NotImplementedException("method only used for SendFile, not concerned with that yet.");
} }


Task<Stream> IRestClient.Send(string method, string endpoint, string json)
Task<Stream> IRestClient.Send(string method, string endpoint, string json, bool headerOnly = false)
{ {
if (headerOnly) return null;
return Task.FromResult<Stream>(new MemoryStream(Encoding.UTF8.GetBytes(EndpointHandler.Instance.HandleMessage(method, endpoint, json)))); return Task.FromResult<Stream>(new MemoryStream(Encoding.UTF8.GetBytes(EndpointHandler.Instance.HandleMessage(method, endpoint, json))));
} }




Loading…
Cancel
Save