nethttpfunc

command
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2018 License: Apache-2.0 Imports: 5 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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