+6
appview/pages/htmx.go
+6
appview/pages/htmx.go
···
15
15
w.Write([]byte(html))
16
16
}
17
17
18
+
// HxRefresh is a client-side full refresh of the page.
19
+
func (s *Pages) HxRefresh(w http.ResponseWriter) {
20
+
w.Header().Set("HX-Refresh", "true")
21
+
w.WriteHeader(http.StatusOK)
22
+
}
23
+
18
24
// HxRedirect is a full page reload with a new location.
19
25
func (s *Pages) HxRedirect(w http.ResponseWriter, location string) {
20
26
w.Header().Set("HX-Redirect", location)