3.76Enabling ETag Response Caching
ETag (entity tag) is a mechanism in the HTTP protocol used to identify the version of a resource. The server returns the resource's ETag value in the response headers (for example, "abc123"), and the client can carry this value via the If-None-Match header in subsequent requests. If the resource has not changed, the server returns 304 Not Modified and does not need to retransmit the content; otherwise, it returns the new content and a new ETag.
After ETag caching is enabled, the framework handles this process automatically: the first request caches the response and the ETag, subsequent requests automatically attach If-None-Match; when a 304 status code is received, the cached content is reused directly, reducing data transmission and improving request efficiency. In weak network environments or mobile data-billing scenarios, this mechanism can significantly reduce bandwidth consumption while speeding up response times.
HttpRequestBuilder.Get("https://furion.net/") .UseETag();HttpRequestBuilder.Get("https://furion.net/") .UseETag(false); // Disable this feature (default value)