Table of Contents

Property AutoDecompressResponse

Namespace
CurlUnity.Http

AutoDecompressResponse

是否让 libcurl 自动处理响应压缩。默认 true

true:发送 Accept-Encoding: gzip, deflate(按编译时链接的 压缩库), libcurl 自动解压响应, HttpResponse.Body 拿到的是解压后的原文。 对 JSON/HTML/text 可降低 3-5 倍下行流量。

false:不发 Accept-Encoding, 响应按 server 原样交付; 如果 server 仍回 Content-Encoding: gzip, Body 是压缩字节, 需调用方自理。

public bool AutoDecompressResponse { get; set; }

Property Value

bool