diff --git a/http.go b/http.go new file mode 100644 index 0000000..d7cf68e --- /dev/null +++ b/http.go @@ -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 +}