documentation

package module
v0.0.0-...-6a47ec5 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2023 License: BSD-2-Clause Imports: 0 Imported by: 0

README

Handy Handlers

Collection of useful HTTP handlers that form a handler stack of filters. Many are opinionated for a specific purpose.

GoDoc

API

The signature for a handler wrapper ends with an http.Handler interface and returns a http.Handler interface. For example:

func Log(w io.Writer, http.Handler) http.Handler

func CORS(methods, origins []string, http.Handler) http.Handler

Contributing

Fork the repo and add your fix or handler with tests. Make a pull request.

Documentation

Overview

Package handy organizes some useful http server handler filters or handlers for reuse.

Directories

Path Synopsis
Package accept contains filters to reject requests without a specified Accept header with "406 Not Acceptable".
Package accept contains filters to reject requests without a specified Accept header with "406 Not Acceptable".
Package atomic implements atomic accessors for primitives
Package atomic implements atomic accessors for primitives
Package breaker implements a circuit breaker with configurable failure thresholds.
Package breaker implements a circuit breaker with configurable failure thresholds.
Package cors contains filters to handle CORS related requests defined from http://www.w3.org/TR/cors/
Package cors contains filters to handle CORS related requests defined from http://www.w3.org/TR/cors/
Package encoding contains Content-Encoding related filters.
Package encoding contains Content-Encoding related filters.
Package proxy contains a proxying HTTP transport.
Package proxy contains a proxying HTTP transport.
Package redirect contains filters to handle HTTP and HTTPS redirects
Package redirect contains filters to handle HTTP and HTTPS redirects
Package report organizes textual reporting from the HTTP context.
Package report organizes textual reporting from the HTTP context.
Package retry implements a retrying transport based on a combination of strategies.
Package retry implements a retrying transport based on a combination of strategies.
Package rewrite contains filters to handle HTTP rewrites
Package rewrite contains filters to handle HTTP rewrites

Jump to

Keyboard shortcuts

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