add disposal docs

pull/3925/head
crobibero 4 years ago
parent 3a91047413
commit be67528958

@ -1071,6 +1071,7 @@ namespace Jellyfin.Api.Controllers
{
var client = _httpClientFactory.CreateClient();
// https://json.schedulesdirect.org/20141201/available/countries
// Can't dispose the response as it's required up the call chain.
var response = await client.GetAsync("https://json.schedulesdirect.org/20141201/available/countries")
.ConfigureAwait(false);

@ -36,6 +36,7 @@ namespace Jellyfin.Api.Helpers
httpClient.DefaultRequestHeaders.Add(HeaderNames.UserAgent, useragent);
}
// Can't dispose the response as it's required up the call chain.
var response = await httpClient.GetAsync(state.MediaPath).ConfigureAwait(false);
var contentType = response.Content.Headers.ContentType.ToString();

Loading…
Cancel
Save