httputil

package
v0.0.0-...-5c01a83 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2015 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package httputil provides http utilities for stenographer.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Context

Context returns a new context.Content that cancels when the underlying http.ResponseWriter closes.

func Log

func Log(w http.ResponseWriter, r *http.Request, logRequestBody bool) http.ResponseWriter

New returns a new ResponseWriter which provides a nice String() method for easy printing. The expected usage is:

func (h *myHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
  w = httputil.Log(w, r, false)
  defer log.Print(w)  // Prints out useful information about request AND response
  ... do stuff ...
}

Types

This section is empty.

Jump to

Keyboard shortcuts

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