response

package
v0.0.0-...-c4191a4 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package response provides wrapper for http.response.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Writer

type Writer struct {
	http.ResponseWriter // The underlying ResponseWriter.
	// contains filtered or unexported fields
}

Writer wraps http.ResponseWriter for extra features.

func NewWriter

func NewWriter(writer http.ResponseWriter) *Writer

NewWriter creates and returns a new Writer.

func (*Writer) Flush

func (w *Writer) Flush()

Flush sends any buffered data to the client.

func (*Writer) Hijack

func (w *Writer) Hijack() (conn net.Conn, writer *bufio.ReadWriter, err error)

Hijack implements the interface function of http.Hijacker.Hijack.

func (*Writer) IsHeaderWrote

func (w *Writer) IsHeaderWrote() bool

IsHeaderWrote returns if the header status is written.

func (*Writer) IsHijacked

func (w *Writer) IsHijacked() bool

IsHijacked returns if the connection is hijacked.

func (*Writer) WriteHeader

func (w *Writer) WriteHeader(status int)

WriteHeader implements the interface of http.ResponseWriter.WriteHeader.

Jump to

Keyboard shortcuts

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