Is there a way to convert default payload format to json in a transparent way? #2325
-
most of REST APIS are expecting json payload and a good amount of tools exists to handle it. how could i make htmx payloads to send json instead form? does it make any sense? |
Beta Was this translation helpful? Give feedback.
Answered by
nickchomey
Feb 16, 2024
Replies: 1 comment 2 replies
-
No, I don't think this makes any sense at all. Htmx works with hypermedia, not json. Also, rest APIs that work with json aren't actually rest APIs - they're json APIs. If you don't want to work with hypermedia, just use the "good amount of tools" that expect json rather than htmx... Check out https://htmx.org/essays to learn more about all of this |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
sombriks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
No, I don't think this makes any sense at all. Htmx works with hypermedia, not json. Also, rest APIs that work with json aren't actually rest APIs - they're json APIs.
If you don't want to work with hypermedia, just use the "good amount of tools" that expect json rather than htmx...
Check out https://htmx.org/essays to learn more about all of this