Timmmm
Timmmm

Reputation: 97038

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: 6439

Answers (1)

Thundercat
Thundercat

Reputation: 121129

Set the transfer encoding header to identity:

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

Upvotes: 4

Related Questions