3.47设置自定义身份认证
创建于 2026 年 8 月 17 日约 1 分钟读完
向请求中添加自定义的 Authorization 标头,遵循 Schema 值 的格式。
HttpRequestBuilder.Post("https://furion.net/") .AddAuthentication(new AuthenticationHeaderValue("your-schema", "your-secret"));HttpRequestBuilder.Post("https://furion.net/") .AddAuthentication("your-schema", "your-secret"); // 重载版本,简化 new AuthenticationHeaderValue 操作