mirror of
https://jihulab.com/DGP-Studio/Snap.Hutao.git
synced 2025-11-19 21:02:53 +08:00
Compare commits
1 Commits
feat/daily
...
feat/patch
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
99b2ccb33b |
@@ -1,6 +1,7 @@
|
||||
// Copyright (c) DGP Studio. All rights reserved.
|
||||
// Licensed under the MIT license.
|
||||
|
||||
using Snap.Hutao.Core;
|
||||
using Snap.Hutao.Core.DependencyInjection.Annotation.HttpClient;
|
||||
using Snap.Hutao.Web.Hutao.Response;
|
||||
using Snap.Hutao.Web.Request.Builder;
|
||||
@@ -15,6 +16,7 @@ internal sealed partial class HutaoInfrastructureClient
|
||||
{
|
||||
private readonly IHttpRequestMessageBuilderFactory httpRequestMessageBuilderFactory;
|
||||
private readonly ILogger<HutaoInfrastructureClient> logger;
|
||||
private readonly RuntimeOptions runtimeOptions;
|
||||
private readonly HttpClient httpClient;
|
||||
|
||||
public async ValueTask<HutaoResponse<StaticResourceSizeInformation>> GetStaticSizeAsync(CancellationToken token = default)
|
||||
@@ -41,6 +43,7 @@ internal sealed partial class HutaoInfrastructureClient
|
||||
{
|
||||
HttpRequestMessageBuilder builder = httpRequestMessageBuilderFactory.Create()
|
||||
.SetRequestUri(HutaoEndpoints.PatchSnapHutao)
|
||||
.SetHeader("x-device-id", runtimeOptions.DeviceId)
|
||||
.Get();
|
||||
|
||||
HutaoResponse<HutaoVersionInformation>? resp = await builder.TryCatchSendAsync<HutaoResponse<HutaoVersionInformation>>(httpClient, logger, token).ConfigureAwait(false);
|
||||
|
||||
Reference in New Issue
Block a user