|
|
|
@ -38,8 +38,12 @@ namespace Ombi.Api
|
|
|
|
|
var httpResponseMessage = await _client.SendAsync(httpRequestMessage);
|
|
|
|
|
|
|
|
|
|
if (!httpResponseMessage.IsSuccessStatusCode)
|
|
|
|
|
{
|
|
|
|
|
if (!request.IgnoreErrors)
|
|
|
|
|
{
|
|
|
|
|
LogError(request, httpResponseMessage);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (request.Retry)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
@ -93,9 +97,12 @@ namespace Ombi.Api
|
|
|
|
|
|
|
|
|
|
var httpResponseMessage = await _client.SendAsync(httpRequestMessage);
|
|
|
|
|
if (!httpResponseMessage.IsSuccessStatusCode)
|
|
|
|
|
{
|
|
|
|
|
if (!request.IgnoreErrors)
|
|
|
|
|
{
|
|
|
|
|
LogError(request, httpResponseMessage);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
// do something with the response
|
|
|
|
|
var data = httpResponseMessage.Content;
|
|
|
|
|
|
|
|
|
@ -111,11 +118,14 @@ namespace Ombi.Api
|
|
|
|
|
AddHeadersBody(request, httpRequestMessage);
|
|
|
|
|
var httpResponseMessage = await _client.SendAsync(httpRequestMessage);
|
|
|
|
|
if (!httpResponseMessage.IsSuccessStatusCode)
|
|
|
|
|
{
|
|
|
|
|
if (!request.IgnoreErrors)
|
|
|
|
|
{
|
|
|
|
|
LogError(request, httpResponseMessage);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private static void AddHeadersBody(Request request, HttpRequestMessage httpRequestMessage)
|
|
|
|
|
{
|
|
|
|
|