Categorygithub.com/wrapp/httplib
modulepackage
0.0.0-20170824150445-dbc1e03eeb10
Repository: https://github.com/wrapp/httplib.git
Documentation: pkg.go.dev

# README

httplib

Go library functions for HTTP services

# Functions

No description provided by the author
LogRequest is a middleware that logs a request HTTP status < 400 will be logged as Info HTTP status >= 400 && < 500 will be logged as Info with the body as message HTTP status >= 500 will be logged as Error with the body as message.
Recover is a middleware that recovers a handler from an error and logs the traceback.
RunHTTP starts a webserver with Wrapp logging and panic recovery The port number is fetched from the environment variable SERVICE_PORT FIXME: mylog parameter kept for legacy reasons, it should be dropped.
ValidateJSONSchema returns a http middleware that validates the supplied JSON schema.

# Structs

No description provided by the author
No description provided by the author