httputils

package
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2025 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Error added in v0.7.0

func Error(w http.ResponseWriter, msg string, err error, code int)

func NewHTTPClient

func NewHTTPClient() (*http.Client, error)

func Write added in v0.7.0

func Write(w http.ResponseWriter, content []byte)

func WriteJSON added in v0.7.0

func WriteJSON(w http.ResponseWriter, content any)

Types

type LoggedHTTPRoundTripper

type LoggedHTTPRoundTripper struct {
	DecoratedTransport http.RoundTripper
}

func (LoggedHTTPRoundTripper) RoundTrip

func (rt LoggedHTTPRoundTripper) RoundTrip(req *http.Request) (*http.Response, error)

Jump to

Keyboard shortcuts

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