htmx/www/extensions/method-override.md
Denis Palashevskii f44b04f1a1
Docs: Move extension script URL to the start of the page (#1232)
* Move extension script URL to the start of the page

* Improve visibility of installation instructions on /extensions page
2023-02-02 10:34:17 -07:00

598 B

layout title
layout.njk </> htmx - high power tools for html

The method-override Extension

This extension makes non-GET and POST requests use a POST with the X-HTTP-Method-Override header set to the actual HTTP method. This is necessary when dealing with some firewall or proxy situations.

Install

<script src="https://unpkg.com/htmx.org/dist/ext/method-override.js">

Usage

<body hx-ext="method-override">
   <button hx-put="/update">
     This request will be made as a POST w/ the X-HTTP-Method-Override Header Set
</button>
</body>