mirror of
https://github.com/gin-gonic/gin.git
synced 2025-10-23 10:02:10 +08:00
34 lines
761 B
Go
34 lines
761 B
Go
// +build go1.7
|
|
|
|
// Copyright 2018 Gin Core Team. All rights reserved.
|
|
// Use of this source code is governed by a MIT style
|
|
// license that can be found in the LICENSE file.
|
|
|
|
package gin
|
|
|
|
import "net/http"
|
|
|
|
// ResponseWriter ...
|
|
type ResponseWriter interface {
|
|
http.ResponseWriter
|
|
http.Hijacker
|
|
http.Flusher
|
|
http.CloseNotifier
|
|
|
|
// Returns the HTTP response status code of the current request.
|
|
Status() int
|
|
|
|
// Returns the number of bytes already written into the response http body.
|
|
// See Written()
|
|
Size() int
|
|
|
|
// Writes the string into the response body.
|
|
WriteString(string) (int, error)
|
|
|
|
// Returns true if the response body was already written.
|
|
Written() bool
|
|
|
|
// Forces to write the http header (status code + headers).
|
|
WriteHeaderNow()
|
|
}
|