Documentation
¶
Index ¶
- Constants
- func GetDefaultHeaders(contentLen int) headers.Headers
- type StatusCode
- type Writer
- func (w *Writer) Write(p []byte) (n int, err error)
- func (w *Writer) WriteBody(p []byte) (int, error)
- func (w *Writer) WriteChunkedBody(p []byte) (int, error)
- func (w *Writer) WriteChunkedBodyDone() (int, error)
- func (w *Writer) WriteHeaders(headers headers.Headers) error
- func (w *Writer) WriteStatusLine(statusCode StatusCode) error
- func (w *Writer) WriteTrailers(trailers headers.Headers) error
Constants ¶
View Source
const ( WritingStatusLine int = iota WritingHeaders WritingBody WritingTrailers Done )
Variables ¶
This section is empty.
Functions ¶
func GetDefaultHeaders ¶
Types ¶
type StatusCode ¶
type StatusCode int
const ( OK StatusCode = 200 BAD_REQUEST StatusCode = 400 INTERNAL_SERVER_ERROR StatusCode = 500 )
type Writer ¶
func (*Writer) WriteChunkedBodyDone ¶
func (*Writer) WriteStatusLine ¶
func (w *Writer) WriteStatusLine(statusCode StatusCode) error
Click to show internal directories.
Click to hide internal directories.