基础特案例

异常验证

//参数验证不为空
  ArgumentNullException.ThrowIfNull(services);
  

请求头默认传输二进制文件

context.Response.ContentType = "application/octet-stream";
context.Response.Headers.Append("Content-Disposition", 
new string[] { $"attachment;filename={generate.Domain.TrimStart('*')}.zip" });

 


版本号 #2
由 叶子 创建于 1 十一月 2024 14:05:25
由 叶子 更新于 25 十一月 2024 22:27:09