Dumps Request into string
dumper := &sutils.Dumper{}
Dumper
has a ServeHTTP
which just dumps everything, including http.Request
.
Convert a func(http.ResponseWriter, *http.Request)
to HandlerItself
to so that it becomes a self-calling http.Handler
Tells requests to always use correct scheme
.
// Only 300 error codes work as expected, browser thing
NewHostRewriteHandler(desired_host, path_prefix_to_add, code_to_return)
&RedirectHandler{Path: "", Code: http.StatusMovedPermanently}
// Does exacetly what you think
Redirects everything behind-the-scenes to target
type StringHandler struct {
Val string
}
Will serve Val
as a webpage