middleware

package
v0.20.0 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2018 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package middleware contains general-purpose HTTP handlers

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HTMLHeaders

func HTMLHeaders(h http.Handler) http.Handler

HTMLHeaders adds the Content-Type text/html header to the request. It adds the header before running the handler. Otherwise, it would be too late to add headers.

func JSONHeaders

func JSONHeaders(h http.Handler) http.Handler

JSONHeaders adds the Content-Type application/json header to the request. It adds the header before running the handler. Otherwise, it would be too late to add headers.

func TextPlainHeaders

func TextPlainHeaders(h http.Handler) http.Handler

TextPlainHeaders adds the Content-Type text/plain header to the request. It adds the header before running the handler. Otherwise, it would be too late to add headers.

Types

This section is empty.

Jump to

Keyboard shortcuts

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