www

package
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 30, 2021 License: BSD-3-Clause Imports: 5 Imported by: 0

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL