httputil

package
v0.32.1 Latest Latest
Warning

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

Go to latest
Published: May 22, 2024 License: AGPL-3.0 Imports: 6 Imported by: 9

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CloseResponse

func CloseResponse(resp *http.Response)

CloseResponse closes the response's body. But reads at least some of the body so if it's small the underlying TCP connection will be re-used. No need to check for errors: if it fails, the Transport won't reuse it anyway.

func GetRequestIP added in v0.25.0

func GetRequestIP(req *http.Request) string

func ListenAndServe added in v0.14.0

func ListenAndServe(ctx context.Context, server *http.Server, shutdownTimeout ...time.Duration) error

func Serve added in v0.14.0

func Serve(ctx context.Context, server *http.Server, l net.Listener, shutdownTimeout ...time.Duration) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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