SolidHeaders

@Serializable
class SolidHeaders(raw: Map<String, List<String>> = emptyMap())

A case-insensitive, HTTP-client-agnostic view of response headers.

Replaces direct exposure of OkHttp's Headers in the resource model so that Shared — and its consumers (the client SDK and third-party apps) — carry no okhttp dependency on their public API. api builds this from okhttp3.Headers.toMultimap(); the header accessors in shared.util (getETag, getWacAllow, getAclUri, …) read from it.

Lookups are case-insensitive, matching HTTP header semantics (and OkHttp's Headers).

Constructors

Link copied to clipboard
constructor(raw: Map<String, List<String>> = emptyMap())

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
operator fun get(name: String): String?

The last value for name (case-insensitive), or null if the header is absent.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Returns the URI of the WAC / ACP access-control resource advertised by Link: <...>; rel="acl", or null if absent.

Link copied to clipboard

Returns the set of HTTP methods listed in the Allow response header, or an empty set if the header is absent. Example: Allow: GET, HEAD, OPTIONS, PUT, PATCH, DELETE

Link copied to clipboard

Extension functions for parsing Solid-specific HTTP headers from OkHttp SolidHeaders. All functions return null / empty when the header is absent.

Link copied to clipboard
Link copied to clipboard

Returns the URI of the description resource advertised by Link: <...>; rel="describedby", or null if absent.

Link copied to clipboard

Returns the full EntityTag from the ETag response header — including a weak validator (W/"..."), unlike getETag which reports only strong tags. Returns null when the header is absent or blank.

Link copied to clipboard

Returns the bare ETag value from the ETag response header, with surrounding quotes stripped, suitable for use as an If-Match validator.

Link copied to clipboard

Returns the URI of the LDN inbox advertised by Link: <...>; rel="http://www.w3.org/ns/ldp#inbox", or null if absent. Solid Protocol §4.1.1 allows this on storage roots and on WebID URLs; agents may also expose it via an ldp:inbox triple in their profile.

Link copied to clipboard

Returns the Last-Modified header value, or null if absent.

Link copied to clipboard

Returns all rel values listed in Link headers as a flat list of strings.

Link copied to clipboard

Returns the set of type URIs advertised via Link: <uri>; rel="type" headers. Used to identify resource types such as ldp:BasicContainer or pim:Storage.

Link copied to clipboard

Returns the Location header value as a URI, or null if absent. This is set on 201 Created responses.

Link copied to clipboard

Returns the OIDC issuer URI advertised by Link: <...>; rel="http://www.w3.org/ns/solid/terms#oidcIssuer", or null if absent.

Link copied to clipboard

Returns the URI of the storage owner advertised by Link: <...>; rel="http://www.w3.org/ns/solid/terms#owner", or null if absent.

Link copied to clipboard

Returns the URI of the storage description resource advertised by Link: <...>; rel="http://www.w3.org/ns/solid/terms#storageDescription", or null if absent.

Link copied to clipboard

Returns the parsed WacAllow from the WAC-Allow response header, or null if the header is absent or malformed.

Link copied to clipboard
Link copied to clipboard

Returns true when the Link header contains rel="type" <http://www.w3.org/ns/pim/space#Storage>, indicating this resource is a Solid pod storage root.

Link copied to clipboard

The underlying multimap (original casing preserved).

Link copied to clipboard
fun values(name: String): List<String>

Every value for name (case-insensitive), in order; empty when absent.