View definition

(ResponseWriter).WriteHeader

Defined in github.com/golang/go/src/net/http/server.go

Description

WriteHeader sends an HTTP response header with status code. If WriteHeader is not called explicitly, the first call to Write will trigger an implicit WriteHeader(http.StatusOK). Thus explicit calls to WriteHeader are mainly used to send error codes.