Interface HtmxRequestHeaders


public interface HtmxRequestHeaders
HTMX Request Headers.
Since:
5.2.0
Author:
Sergio del Amo
See Also:
  • Field Details

  • Method Details

    • isBoost

      boolean isBoost()
      Returns:
      Indicates that the request is via an element using hx-boost
    • getCurrentUrl

      @Nullable @Nullable String getCurrentUrl()
      Returns:
      the current URL of the browser
    • getHistoryRestoreRequest

      @Nullable @Nullable String getHistoryRestoreRequest()
      Returns:
      “true” if the request is for history restoration after a miss in the local history cache
    • getPrompt

      @Nullable @Nullable String getPrompt()
      Returns:
      the user response to an hx-prompt
    • getTarget

      @Nullable @Nullable String getTarget()
      Returns:
      the id of the target element if it exists
    • getTriggerName

      @Nullable @Nullable String getTriggerName()
      Returns:
      the name of the triggered element if it exists
    • getTrigger

      @Nullable @Nullable String getTrigger()
      Returns:
      the id of the triggered element if it exists
    • of

      static Optional<HtmxRequestHeaders> of(io.micronaut.http.HttpHeaders headers)
      Parameters:
      headers - HTTP Headers
      Returns:
      an Optional of HtmxRequestHeaders
    • of

      @NonNull static @NonNull Optional<HtmxRequestHeaders> of(io.micronaut.http.HttpRequest<?> request)
      Parameters:
      request - HTTP Request
      Returns:
      an Optional of HtmxRequestHeaders