File tree 1 file changed +10
-2
lines changed
1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -132,12 +132,20 @@ type ResponseWriter interface {
132
132
// possible to maximize compatibility.
133
133
Write ([]byte ) (int , error )
134
134
135
- // WriteHeader sends an HTTP response header with status code.
135
+ // WriteHeader sends an HTTP response header with the provided
136
+ // status code.
137
+ //
136
138
// If WriteHeader is not called explicitly, the first call to Write
137
139
// will trigger an implicit WriteHeader(http.StatusOK).
138
140
// Thus explicit calls to WriteHeader are mainly used to
139
141
// send error codes.
140
- WriteHeader (int )
142
+ //
143
+ // The provided code must be a valid HTTP 1xx-5xx status code.
144
+ // Only one header may be written. Go does not currently
145
+ // support sending user-defined 1xx informational headers,
146
+ // with the exception of 100-continue response header that the
147
+ // Server sends automatically when the Request.Body is read.
148
+ WriteHeader (statusCode int )
141
149
}
142
150
143
151
// The Flusher interface is implemented by ResponseWriters that allow
You can’t perform that action at this time.
0 commit comments