代码拉取完成,页面将自动刷新
同步操作将从 RHQYZ/DotNetCore.SKIT.FlurlHttpClient.Wechat 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
如果有某些接口本库尚未支持,你可按照下面的示例自行扩展:
/* 继承 WechatApiRequest 实现自定义请求类 */
public class MyFakeRequest : WechatApiRequest
{
[Newtonsoft.Json.JsonProperty("my_fake_props")]
[System.Text.Json.Serialization.JsonPropertyName("my_fake_props")]
public string MyFakeProps { get; set; }
}
/* 继承 WechatApiResponse 实现自定义响应类 */
public class MyFakeResponse : WechatApiResponse
{
[Newtonsoft.Json.JsonProperty("my_fake_props")]
[System.Text.Json.Serialization.JsonPropertyName("my_fake_props")]
public string MyFakeProps { get; set; }
}
/* 扩展 WechatApiClient 方法 */
public static class MyFakeClientExtensions
{
public static async Task<MyFakeResponse> ExecuteMyFakeAsync(this WechatApiClient client, MyFakeRequest request, CancellationToken cancellationToken = default)
{
if (client is null) throw new ArgumentNullException(nameof(client));
if (request is null) throw new ArgumentNullException(nameof(request));
IFlurlRequest flurlReq = client
.CreateRequest(request, HttpMethod.Post, "my-fake-url")
.SetQueryParam("access_token", request.AccessToken);
return await client.SendRequestWithJsonAsync<MyFakeResponse>(flurlReq, request, cancellationToken);
}
}
同样地,你也可自行扩展回调通知事件模型:
/* 继承 WechatApiEvent 实现自定义的 JSON 格式的回调通知事件 */
public class MyFakeEvent : WechatApiEvent, WechatApiEvent.Serialization.IJsonSerializable
{
[Newtonsoft.Json.JsonProperty("my_fake_props")]
[System.Text.Json.Serialization.JsonPropertyName("my_fake_props")]
public string MyFakeProps { get; set; }
}
/* 继承 WechatApiEvent 实现自定义的 XML 格式的回调通知事件 */
public class MyFakeEvent : WechatApiEvent, WechatApiEvent.Serialization.IXmlSerializable
{
[System.Xml.Serialization.XmlElement("my_fake_props")]
public string MyFakeProps { get; set; }
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。