💭 How to configure base url for all requests using HTMX? - Stack...
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

!https://stackoverflow.com/questions/69456875/how-to-configure-base-url-for-all-requests-using-htmx

Date: December 30, 2024

External Link stackoverflow.com

Today I learned how to configure the baseurl for [4m[38;2;248;248;242mhtmx[0m <[38;2;248;248;242m/htmx/[0m> using the tag. This is pretty handy to be able to configure different baseurls.

[38;2;248;248;242m[code][0m
    <base href="<scheme>://<netloc>/api/v1/">
    <button hx-post="clicked"
         hx-trigger="click"
         hx-target="#parent-div"
         hx-swap="outerHTML">
      Click Me!
    </button>

[38;2;68;71;90mNOTE[0m
[38;2;68;71;90m│ [0mThis post is a [4m[38;2;248;248;242mthought[0m <[38;2;248;248;242m/thoughts/[0m>. It’s a short note that I make about someone else’s content online #thoughts
