Documentation ¶
Overview ¶
package www provides common net/http handlers for reader-related HTTP requests.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DataHandler ¶
func DataHandler(r reader.Reader) (http.HandlerFunc, error)
Emit the out of r.Read for a URI. This handler is meant to be used in conjunction with ParseURIHandler middleware handler. For example:
handler, _ := www.DataHandler(r) handler = www.ParseURIHandler(handler)
func RedirectHandler ¶
func RedirectHandler(r reader.Reader) (http.HandlerFunc, error)
Emit an HTTP redirect header for the value of r.ReaderURI for a URI. This handler is meant to be used in conjunction with ParseURIHandler middleware handler. For example:
handler, _ := www.RedirectHandler(r) handler = www.ParseURIHandler(handler)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.