Fixed HttpClient error on non-DNX builds
This commit is contained in:
@@ -174,7 +174,11 @@ namespace Discord.Helpers
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
#if !NET45
|
||||||
response = await _client.SendAsync(msg, HttpCompletionOption.ResponseHeadersRead).ConfigureAwait(false);
|
response = await _client.SendAsync(msg, HttpCompletionOption.ResponseHeadersRead).ConfigureAwait(false);
|
||||||
|
#else
|
||||||
|
response = await _client.SendAsync(msg, HttpCompletionOption.ResponseContentRead).ConfigureAwait(false);
|
||||||
|
#endif
|
||||||
if (!response.IsSuccessStatusCode)
|
if (!response.IsSuccessStatusCode)
|
||||||
throw new HttpException(response.StatusCode);
|
throw new HttpException(response.StatusCode);
|
||||||
result = null;
|
result = null;
|
||||||
|
|||||||
Reference in New Issue
Block a user