NPRPC docs

function getCookie

Swift

func getCookie(name: String) -> String?

Read a named cookie from the current HTTP or WebSocket request.

Returns nil when:

  • called outside a servant dispatch(), or
  • the named cookie is absent, or
  • the transport is native (TCP / shared-memory).

nprpc_swift/Sources/NPRPC/HttpAuth.swift:66