object
http_htmx
Transport-neutral HTMX request classification, HTML reply helpers, and response decoration helpers for normalized HTTP messages.
logtalk_load(http_htmx(loader))static, context_switching_callsPublic predicates
is_htmx_request/1
Succeeds when the request carries a truthy HX-Request header value.
staticis_htmx_request(Request)is_htmx_request(+compound) - zero_or_oneis_boosted_request/1
Succeeds when the request carries a truthy HX-Boosted header value.
staticis_boosted_request(Request)is_boosted_request(+compound) - zero_or_oneis_history_restore_request/1
Succeeds when the request carries a truthy HX-History-Restore-Request header value.
staticis_history_restore_request(Request)is_history_restore_request(+compound) - zero_or_oneis_fragment_request/1
Succeeds when the request should receive fragment content, meaning an HTMX request that is neither boosted nor a history restore request.
staticis_fragment_request(Request)is_fragment_request(+compound) - zero_or_onerequest_kind/2
Classifies the request as one of ordinary, fragment, boosted, or history_restore.
staticrequest_kind(Request,Kind)request_kind(+compound,-atom) - one_or_errorcurrent_url/2
Returns the single request HX-Current-URL header value when present.
staticcurrent_url(Request,URL)current_url(+compound,-atom) - zero_or_onecurrent_url_abs_path/2
Returns the same-origin absolute-path form of the HX-Current-URL header value, including any query component but excluding scheme, authority, and fragment.
staticcurrent_url_abs_path(Request,AbsolutePath)current_url_abs_path(+compound,-atom) - zero_or_oneprompt/2
Returns the single request HX-Prompt header value when present.
staticprompt(Request,Prompt)prompt(+compound,-atom) - zero_or_onetarget/2
Returns the single request HX-Target header value when present.
statictarget(Request,Target)target(+compound,-atom) - zero_or_onetrigger/2
Returns the single request HX-Trigger header value when present.
statictrigger(Request,Trigger)trigger(+compound,-atom) - zero_or_onetrigger_name/2
Returns the single request HX-Trigger-Name header value when present.
statictrigger_name(Request,Name)trigger_name(+compound,-atom) - zero_or_onerequest_properties/2
Returns a list of derived HTMX request properties and request classification computed from the normalized request headers.
staticrequest_properties(Request,Properties)request_properties(+compound,-list(compound)) - one_or_errorrequest_property/2
Enumerates or tests individual derived HTMX request properties and request classification computed from the normalized request headers.
staticrequest_property(Request,Property)request_property(+compound,?compound) - zero_or_morepage_fragment_reply/4
Builds a normalized text/html response using the fragment content when is_fragment_request/1 succeeds and the full-page content otherwise, with the default options.
staticpage_fragment_reply(Request,PageContent,FragmentContent,Response)page_fragment_reply(+compound,+term,+term,-compound) - one_or_errorRequest is not a valid normalized HTTP request term:domain_error(http_request,Request)PageContent or FragmentContent cannot be rendered as HTMX HTML content:domain_error(http_htmx_content,Content)domain_error(htmx_response_headers_status,Status)domain_error(http_header_semantics,Header)page_fragment_reply/5
Builds a normalized text/html response using the fragment content when is_fragment_request/1 succeeds and the full-page content otherwise, with the given options.
staticpage_fragment_reply(Request,PageContent,FragmentContent,Response,Options)page_fragment_reply(+compound,+term,+term,-compound,+list(compound)) - one_or_errorRequest is not a valid normalized HTTP request term:domain_error(http_request,Request)PageContent or FragmentContent cannot be rendered as HTMX HTML content:domain_error(http_htmx_content,Content)Options is a variable or a partial list:instantiation_errorOptions is neither a variable nor a list:type_error(list,Options)Option of the list Options is neither a variable nor a compound term:type_error(compound,Option)Option of the list Options is a compound term but not a valid option:domain_error(option,Option)domain_error(htmx_response_headers_status,Status)domain_error(http_header_semantics,Header)add_response_headers/4
Decorates a normalized response with the relevant HTMX response headers and optional cache-vary metadata.
staticadd_response_headers(Request,Response0,Response,Options)add_response_headers(+compound,+compound,-compound,+list(compound)) - one_or_errorRequest is not a valid normalized HTTP request term:domain_error(http_request,Request)Response0 is not a valid normalized HTTP response term:domain_error(http_response,Response0)Options is a variable or a partial list:instantiation_errorOptions is neither a variable nor a list:type_error(list,Options)Option of the list Options is neither a variable nor a compound term:type_error(compound,Option)Option of the list Options is a compound term but not a valid option:domain_error(option,Option)domain_error(htmx_response_headers_status,Status)domain_error(http_header_semantics,Header)Protected predicates
(no local declarations; see entity ancestors if any)
Private predicates
(no local declarations; see entity ancestors if any)
Operators
(none)