-2

I am looking for update the data written in http.ResponseWriter.

Is there any way in golang, we get pointer/handle to the written []byte and update it before serving the request?

mpromonet
  • 11,326
  • 43
  • 62
  • 91
SSETH
  • 11
  • 3
  • 2
    There is no guarantee that all the data written will be in a buffer. Implement your own response writer higher in the call chain so you can intercept the write calls. – Burak Serdar Aug 08 '21 at 17:07

1 Answers1

1

Is there any way in golang, we get pointer/handle to the written []byte and update it before serving the request?

No.

Volker
  • 40,468
  • 7
  • 81
  • 87