是否可以将预告片标头刷新到客户端?

This results in 2 DATA frames being sent from a server:

func(w http.ResponseWriter, r *http.Request) {
    w.Write("foo")
    w.(http.Flusher).Flush()
    w.Write("bar")
    w.(http.Flusher).Flush()
}

This results in 1 HEADERS frames being sent from a server:

func(w http.ResponseWriter, r *http.Request) {
    w.Header().Set("Trailer:X", "a")
    w.(http.Flusher).Flush()
    w.Header().Set("Trailer:Y", "b")
    w.(http.Flusher).Flush()
}

Is there any way to get trailer frames sent as multiple HEADERS frames without using the framer api?

Usually Headers (or Trailers) can only be set before any response is sent to the client. After the first non-header data is sent, no further headers will be sent.

// Changing the header map after a call to WriteHeader (or
// Write) has no effect unless the modified headers are
// trailers.

https://golang.org/pkg/net/http/#ResponseWriter