response

package
v0.0.0-...-ee364c6 Latest Latest
Warning

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

Go to latest
Published: May 6, 2024 License: MPL-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Writer

type Writer struct {
	Status       int
	HideResponse bool
	Body         []byte
	Time         int64
	http.ResponseWriter
}

func NewWriter

func NewWriter(w http.ResponseWriter) *Writer

func (*Writer) Redirect

func (w *Writer) Redirect(location string, r *http.Request)

func (*Writer) String

func (w *Writer) String() string

func (*Writer) Write

func (w *Writer) Write(bytes []byte) (int, error)

func (*Writer) WriteHTML

func (w *Writer) WriteHTML(code int, response string)

func (*Writer) WriteHeader

func (w *Writer) WriteHeader(code int)

func (*Writer) WriteJSON

func (w *Writer) WriteJSON(code int, responseObject any)

func (*Writer) WriteSSE

func (w *Writer) WriteSSE(event, data string) error

func (*Writer) WriteString

func (w *Writer) WriteString(code int, response string)

Jump to

Keyboard shortcuts

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