Skip to content

Latest commit

 

History

History

hx-vals

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

Using hx-vals on all HTTP verbs

This example shows how to use hx-vals to pass parameters to all supported HTTP verbs (doc)

<ul><lihx-get="/htmx" hx-vals='{"Name": "Anna"}'>GET</li><lihx-post="/htmx" hx-vals='{"Name": "Anna"}'>POST</li><lihx-put="/htmx" hx-vals='{"Name": "Anna"}'>PUT</li><lihx-patch="/htmx" hx-vals='{"Name": "Anna"}'>PATCH</li><lihx-delete="/htmx" hx-vals='{"Name": "Anna"}'>DELETE</li></ul>

On GET and DELETE, the parameters are accessible via Request.Query. For the rest, you can access the parameters via Request.Form.

close