Timmmm
Timmmm

Reputation: 96547

Disable chunked transfer encoding in go without using content-length

Is there a way to disable chunked transfer encoding in go without using a content-length?

It's for Server-Sent Events which can't have either.

Upvotes: 3

Views: 6422

Answers (1)

Thundercat
Thundercat

Reputation: 120941

Set the transfer encoding header to identity:

w.Header().Set("Transfer-Encoding", "identity")

Upvotes: 4

Related Questions