Skip to content

Commit

Permalink
Merge branch 'dev' of https://github.com/JoaoCruz2001/pnpframework in…
Browse files Browse the repository at this point in the history
…to pr896
  • Loading branch information
jansenbe committed Apr 24, 2024
2 parents 436e34a + 539cef2 commit 4f25997
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/lib/PnP.Framework/ALM/AppManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -919,14 +919,14 @@ private static async Task<AppMetadata> GetAppMetaData(AppCatalogScope scope, Cli

var metadataRequestUrl = $"{context.Web.Url}/_api/web/{(scope == AppCatalogScope.Tenant ? "tenant" : "sitecollection")}appcatalog/AvailableApps/GetById('{id}')";

using (var metadataRequest = new HttpRequestMessage(HttpMethod.Get, metadataRequestUrl))
while (returnValue == null && retryCount < 5)
{
metadataRequest.Headers.Add("accept", "application/json;odata=nometadata");

await PnPHttpClient.AuthenticateRequestAsync(metadataRequest, context).ConfigureAwait(false);

while (returnValue == null && retryCount < 5)
using (var metadataRequest = new HttpRequestMessage(HttpMethod.Get, metadataRequestUrl))
{
metadataRequest.Headers.Add("accept", "application/json;odata=nometadata");

await PnPHttpClient.AuthenticateRequestAsync(metadataRequest, context).ConfigureAwait(false);

// Perform actual post operation
HttpResponseMessage metadataResponse = await httpClient.SendAsync(metadataRequest, new System.Threading.CancellationToken());

Expand All @@ -951,8 +951,8 @@ private static async Task<AppMetadata> GetAppMetaData(AppCatalogScope scope, Cli
await Task.Delay(waitTime * 1000); // wait 10 seconds
}
}
return returnValue;
}
}
return returnValue;
}
#endregion
}
Expand Down

0 comments on commit 4f25997

Please sign in to comment.