Add HTTPData struct

This commit is contained in:
Sasha Koshka 2024-12-06 00:14:55 -05:00
parent c6b5fd7eeb
commit a46cecd5b3

15
http.go Normal file
View File

@ -0,0 +1,15 @@
package step
import "net/http"
// HTTPData represents information about an ongoing HTTP request that is made
// available to templates as they are being executed.
type HTTPData struct {
// Res is like an http.ResponseWriter.
Res struct {
Header http.Header
WriteHeader func (statusCode int)
}
// Req is the HTTP request.
Req *http.Request
}