docs: 完善文档

This commit is contained in:
Fu Diwei
2021-07-28 22:04:16 +08:00
parent 64bebe9fe2
commit dc06c4ff82
3 changed files with 8 additions and 6 deletions

View File

@@ -20,6 +20,8 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Sample_Net5.Services.HttpClients.Imple
{
_httpClientFactory = httpClientFactory;
_wechatOptions = wechatOptions.Value;
FlurlHttp.GlobalSettings.FlurlClientFactory = new DelegatingFlurlClientFactory(_httpClientFactory);
}
public WechatApiClient Create(string appId)
@@ -28,8 +30,6 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Sample_Net5.Services.HttpClients.Imple
if (wechatAccount == null)
throw new Exception("未在配置项中找到该 AppId 对应的微信账号。");
FlurlHttp.GlobalSettings.FlurlClientFactory = new DelegatingFlurlClientFactory(_httpClientFactory);
return new WechatApiClient(new WechatApiClientOptions()
{
AppId = wechatAccount.AppId,