httputil

package
v0.0.0-...-389fe15 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2024 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BadRequest

func BadRequest(w http.ResponseWriter)

func InternalServerError

func InternalServerError(ctx context.Context, w http.ResponseWriter, err error)

func NotFound

func NotFound(w http.ResponseWriter)

func OK

func OK(w http.ResponseWriter, response any)

func PermanentRedirect

func PermanentRedirect(w http.ResponseWriter, url string)

Types

type HTTPError

type HTTPError struct {
	Code    int    `json:"code"`
	Message string `json:"message"`
}

func NewHTTPError

func NewHTTPError(code int, message string) *HTTPError

Jump to

Keyboard shortcuts

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