declared_capabilities
declared_capabilities
Return the capability names the client declared as truthy. Accepts either a full SWML request body or an already-extracted user variables dict, so it works from a dynamic-config callback and from a SWAIG handler without the caller tracking which one it holds.
Parameters
body_params
A SWML request body, or a user variables dict.
Returns
frozenset[str] — Names whose declared value is truthy. Empty when nothing was declared, the
payload was malformed, or the client isn’t a browser at all.
Example
Part of the client capabilities module.