nethttpfunc

command
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2018 License: Apache-2.0 Imports: 5 Imported by: 0

README

Example using HTTP and wrapping a HandlerFunc

This example illustrates wrapping a single HnadlerFunc. It is the simplest form of wrapping an HTTP handler. Though useful for wrapping individual handler functions, it quickly gets cumbersome when wrapping too many. Wrapping a handler or a muxer is much more efficient.

This example is runnable with go run main.go - it will start listening on port 8080.

Once it's running, in another window, issue a request to the /hello endpoint: curl localhost:8080/hello and you should an event appear on STDOUT in the pane running the example.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

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