Files
spring-boot-demo/thymeleaf-htmx/output/10-live-curl.txt
T

36 lines
1.1 KiB
Plaintext

$ 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