Documentation ¶
Overview ¶
Package httpp contains HTTP utilities.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParseContentType ¶ added in v1.8.1
ParseContentType parses a Content-Type header and returns the content type.
func RemoteAddr ¶
RemoteAddr returns the remote address of an HTTP client, with the IP replaced by the real IP passed by any proxy in between.
Types ¶
type Server ¶ added in v1.9.3
type Server struct { Network string Address string ReadTimeout time.Duration Encryption bool ServerCert string ServerKey string Handler http.Handler Parent logger.Writer // contains filtered or unexported fields }
Server is a wrapper around http.Server that provides: - net.Listener allocation and closure - TLS allocation - exit on panic - logging - server header - filtering of invalid requests
func (*Server) Close ¶ added in v1.9.3
func (s *Server) Close()
Close closes all resources and waits for all routines to return.
func (*Server) Initialize ¶ added in v1.9.3
Initialize initializes a Server.
Click to show internal directories.
Click to hide internal directories.