C# HttpClient请求gzip

//设置HttpClientHandler的AutomaticDecompression
var handler = new HttpClientHandler() { AutomaticDecompression = DecompressionMethods.GZip };
//创建HttpClient(注意传入HttpClientHandler)
using HttpClient Http = new HttpClient(handler);

参考文献

https://www.bbsmax.com/A/kvJ3WD7JgM/

posted @ 2022-11-04 17:53  Yu-Core  阅读(392)  评论(0编辑  收藏  举报