Add thymeleaf-htmx module: Spring Boot 4.1.2 + Thymeleaf 3.1.5 + htmx 2.0.11 CRUD UI with fragment rendering, 422 validation re-render, pagination, inline edit, delete, MockMvc tests and a Chromium check
Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_017ic4b7rnC7jppGGdHGESvy
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
$ curl -si http://localhost:18082/contacts | tr -d '\r' | grep -v -E '^(Date|Transfer-Encoding)' | head -10
|
||||
HTTP/1.1 200
|
||||
Vary: HX-Request
|
||||
Vary: HX-History-Restore-Request
|
||||
Content-Type: text/html;charset=UTF-8
|
||||
Content-Language: en-US
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
|
||||
$ curl -si -H 'HX-Request: true' http://localhost:18082/contacts | tr -d '\r' | grep -v -E '^(Date|Transfer-Encoding)' | head -8
|
||||
HTTP/1.1 200
|
||||
Vary: HX-Request
|
||||
Vary: HX-History-Restore-Request
|
||||
Content-Type: text/html;charset=UTF-8
|
||||
Content-Language: en-US
|
||||
|
||||
<div id="contact-table" hx-trigger="contactsChanged from:body" hx-target="this" hx-swap="outerHTML" hx-get="/contacts?page=0">
|
||||
<table>
|
||||
|
||||
$ curl -s -o /dev/null -w '%{http_code} %{content_type}\n' http://localhost:18082/webjars/htmx.org/dist/htmx.min.js
|
||||
200 text/javascript
|
||||
|
||||
$ curl -si -X DELETE -H 'HX-Request: true' http://localhost:18082/contacts/23
|
||||
HTTP/1.1 200
|
||||
Vary: HX-Request
|
||||
Vary: HX-History-Restore-Request
|
||||
HX-Trigger: contactsChanged
|
||||
Content-Length: 0
|
||||
|
||||
|
||||
$ curl -si -X DELETE -H 'HX-Request: true' http://localhost:18082/contacts/23 (again)
|
||||
HTTP/1.1 404
|
||||
Reference in New Issue
Block a user