fix: Ensure disposed stream is not used for further deserialization
Created by: Neuheit
Summary
Fixes an issue reported within several REST guild methods.
Details
When attempting to use methods when the stream is deserialized more than once, users would encounter an exception that the "Stream is not readable". This is because the stream is disposed when converted into a JObject the first time, and would be unable to be used the second time to be deserialized since it is disposed. This PR simply deserializes the entities from the JObject rather than the stream.
I also changed the HttpCompletionOptions to headers rather than content, as this will help to improve performance further.
Changes proposed
- Fix issue with stream deserialization
- Change HttpCompletion options