3.5 library(http/http_session): HTTP Session management
AllApplicationManualNameSummaryHelp

  • Documentation
    • Reference manual
    • Packages
      • SWI-Prolog HTTP support
        • The HTTP server libraries
          • library(http/http_session): HTTP Session management
            • http_set_session_options/1
            • http_session_option/1
            • session_setting/2
            • http_set_session/1
            • http_set_session/2
            • http_session_id/1
            • http_in_session/1
            • http_open_session/2
            • http_session_asserta/1
            • http_session_assert/1
            • http_session_retract/1
            • http_session_retractall/1
            • http_session_data/1
            • http_session_asserta/2
            • http_session_assert/2
            • http_session_retract/2
            • http_session_retractall/2
            • http_session_data/2
            • http_current_session/2
            • http_close_session/1
            • http_session_cookie/1
            • hooked/0
            • hook/1
Availability::- use_module(library(http/http_session)).
Source[semidet]http_in_session(-SessionId)
True if SessionId is an identifier for the current session. The current session is extracted from session(ID) from the current HTTP request (see http_current_request/1). The value is cached in a backtrackable global variable http_session_id. Using a backtrackable global variable is safe because continuous worker threads use a failure driven loop and spawned threads start without any global variables. This variable can be set from the commandline to fake running a goal from the commandline in the context of a session.
See also
http_session_id/1