mirror of
https://gitee.com/fudiwei/DotNetCore.SKIT.FlurlHttpClient.Wechat.git
synced 2026-02-14 20:16:20 +08:00
feat(work): 新增 Credentials 类型,存储初始化客户端时的凭证副本
This commit is contained in:
@@ -26,8 +26,8 @@ namespace SKIT.FlurlHttpClient.Wechat.Work
|
||||
|
||||
IFlurlRequest flurlReq = client
|
||||
.CreateRequest(request, HttpMethod.Get, "cgi-bin", "gettoken")
|
||||
.SetQueryParam("corpid", client.WechatCorpId)
|
||||
.SetQueryParam("corpsecret", client.WechatAgentSecret);
|
||||
.SetQueryParam("corpid", client.Credentials.CorpId)
|
||||
.SetQueryParam("corpsecret", client.Credentials.AgentSecret);
|
||||
|
||||
return await client.SendRequestWithJsonAsync<Models.CgibinGetTokenResponse>(flurlReq, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user