Documentation ¶
Overview ¶
Llano is a mock server, useful when testing other libraries during development.
Index ¶
- func Code200(standardResponse string) http.HandlerFunc
- func Code301(to string) http.HandlerFunc
- func Code302(to string) http.HandlerFunc
- func Code500() http.HandlerFunc
- func Echo(w http.ResponseWriter, r *http.Request)
- func Standalone(address, default200 string)
- func Timeout(w http.ResponseWriter, r *http.Request)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Code200 ¶
func Code200(standardResponse string) http.HandlerFunc
Returns a http.HandlerFunc that always respons with 200: standardResponse
func Code301 ¶
func Code301(to string) http.HandlerFunc
More or less a wrapper around http.Redirect (http://golang.org/pkg/net/http/#Redirect)
func Code302 ¶
func Code302(to string) http.HandlerFunc
More or less a wrapper around http.Redirect (http://golang.org/pkg/net/http/#Redirect)
func Echo ¶
func Echo(w http.ResponseWriter, r *http.Request)
Returns the request body with the original Content-Type forwarded
func Standalone ¶
func Standalone(address, default200 string)
Standalone llano server, listens for all http.Handlers specified in the package with their response code as url (/200, /301) (echo for... echo)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.