mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-12 18:27:23 +01:00
EnsureStatusCode and a comment note
This commit is contained in:
parent
6a8256b827
commit
d2fb9abf80
1 changed files with 5 additions and 2 deletions
|
|
@ -75,9 +75,12 @@ namespace Dalamud.Plugin.Internal
|
|||
{
|
||||
Log.Information($"Fetching repo: {this.PluginMasterUrl}");
|
||||
using var client = new HttpClient();
|
||||
using var response = await client.GetAsync(this.PluginMasterUrl + "?" + DateTime.Now.Ticks);
|
||||
var data = await response.Content.ReadAsStringAsync();
|
||||
|
||||
// ?ticks causes a cache invalidation. Get a fresh repo every time.
|
||||
using var response = await client.GetAsync(this.PluginMasterUrl + "?" + DateTime.Now.Ticks);
|
||||
response.EnsureSuccessStatusCode();
|
||||
|
||||
var data = await response.Content.ReadAsStringAsync();
|
||||
var pluginMaster = JsonConvert.DeserializeObject<List<RemotePluginManifest>>(data);
|
||||
|
||||
if (pluginMaster == null)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue