gh-gei
gh-gei copied to clipboard
Dispose HTTP response in BbsClient and AdoClient
I noticed that in BbsClient and AdoClient we are not disposing the HTTP response that is getting returned by the HttpClient. The response needs to be immediately disposed with a using statement and also all unit tests need to be fixed the way they were fixed in #925.
Todo
- [ ] Dispose the http response in
BbsClient#SendAsync()andAdoClient#SendAsync()methods - [ ] Fix unit tests by using a factory to return a new
HttpResponseMessagewhen mockingHttpMessageHandler(see #925) - [ ] Bonus: Simplify
SendAsyncmethod in bothBbsClientandAdoClientby replacing the switch statement withHttpClient#SendAsync()the way it is in GithubClient#SendAsync().