CachedResponse Class
A response of a cache entry (https://fetch.spec.whatwg.org/#concept-response). The status, the headers, the URL list and the body of an opaque response are the ones of its internal response (the scripts only see its filtered response, e.g. a status of 0 and no body): a service worker can give it to a page (e.g. a cross-origin script).
public sealed class CachedResponseConstructors
| Name | Description |
|---|---|
| CachedResponse() |
CachedResponse()
CacheStorageBackend.cspublic CachedResponse()No documentation is available.
Properties
| Name | Description |
|---|---|
| Body | Gets the body, or null for a response without body. |
| CrossOriginResourcePolicy | Gets the Cross-Origin-Resource-Policy header of the response, or null: the header of an opaque response, whose CachedResponse.Headers are empty, for the cross-origin resource policy check. |
| Headers | Gets the headers. |
| RequestIncludesCredentials | Gets whether the request of the response included the credentials (https://fetch.spec.whatwg.org/#response-request-includes-credentials), for the cross-origin resource policy check of the opaque responses. |
| Status | Gets the status. |
| StatusText | Gets the status message. |
| Type | Gets the type (basic, cors, default, opaque...). |
| UrlList | Gets the URLs of the response (the last one is its URL), or an empty list. |
Gets the body, or null for a response without body.
public ReadOnlyMemory<byte>? Body { get; init; }Property value
CrossOriginResourcePolicy
CacheStorageBackend.csGets the Cross-Origin-Resource-Policy header of the response, or null: the header of an opaque response, whose CachedResponse.Headers are empty, for the cross-origin resource policy check.
public string? CrossOriginResourcePolicy { get; init; }Property value
Headers
CacheStorageBackend.csGets the headers.
public IReadOnlyList<KeyValuePair<string, string>> Headers { get; init; }Property value
RequestIncludesCredentials
CacheStorageBackend.csStatus
CacheStorageBackend.csStatusText
CacheStorageBackend.csUrlList
CacheStorageBackend.csGets the URLs of the response (the last one is its URL), or an empty list.
public IReadOnlyList<string> UrlList { get; init; }