http

package
v0.0.0-...-f88c608 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2025 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SendError

func SendError(w http.ResponseWriter, errToSend error, logger logger.Logger) error

SendError sends a JSON-encoded error response for errors encountered during processing.

func SendStatusAndJSON

func SendStatusAndJSON(w http.ResponseWriter, statusCode int, response interface{}) error

SendStatusAndJSON sends an HTTP status code and a JSON-encoded response to a client.

Types

This section is empty.

Jump to

Keyboard shortcuts

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