An adapter from a Response to something more appropriate for scripts to consume.

This class unwraps Objects given by scripts when needed to avoid leaking JS-specific objects into Java code.

Hierarchy

  • ScriptResponse

Methods

  • Add an encrypted cookie to the response

    If the cookie already exists, the value of the given cookie is added to it. If it's a system defined cookie, it will be ignored.

    Parameters

    • name: string

      The name of the cookie to add, the prefix proc: will be prepended to the name

    • value: string

      The value of the cookie to set

    Returns void

  • Add an encrypted cookie to the response

    If the cookie already exists, the value of the given cookie is added to it. If it's a system defined cookie, it will be ignored.

    Parameters

    • name: string

      The name of the cookie to add, the prefix proc: will be prepended to the name

    • value: string

      The value of the cookie to set

    • options: CookieOptions

    Returns void

  • Add a signed cookie to the response

    If the cookie already exists, the value of the given cookie is added to it. If it's a system defined cookie, it will be ignored.

    Parameters

    • name: string

      The name of the cookie to add, the prefix proc: will be prepended to the name

    • value: string

      The value of the cookie to set

    Returns void

  • Add a signed cookie to the response

    If the cookie already exists, the value of the given cookie is added to it. If it's a system defined cookie, it will be ignored.

    Parameters

    • name: string

      The name of the cookie to add, the prefix proc: will be prepended to the name

    • value: string

      The value of the cookie to set

    • options: CookieOptions

    Returns void