package sihl

  1. Overview
  2. Docs

This module simplifies dealing with HTMX requests by adding type safe helpers to manipulate HTMX headers. Visit https://htmx.org/reference/ for the HTMX documentation.

val is_htmx : Rock.Request.t -> bool
val current_url : Rock.Request.t -> string option
val prompt : Rock.Request.t -> string option
val target : Rock.Request.t -> string option
val trigger_name : Rock.Request.t -> string option
val trigger_req : Rock.Request.t -> string option
val set_push : string -> Rock.Response.t -> Rock.Response.t
val set_redirect : string -> Rock.Response.t -> Rock.Response.t
val set_refresh : string -> Rock.Response.t -> Rock.Response.t
val set_trigger : string -> Rock.Response.t -> Rock.Response.t
val set_trigger_after_settle : string -> Rock.Response.t -> Rock.Response.t
val set_trigger_after_swap : string -> Rock.Response.t -> Rock.Response.t
OCaml

Innovation. Community. Security.