w4 / serde_prometheus

:pager: serde-based serializer for prometheus' text-based exposition format
Other
3 stars 5 forks source link

Fix example for large response #2

Open crodas opened 2 years ago

crodas commented 2 years ago

Read data before writing any data, otherwise the connection may be terminated before all data is actually written. This happens when the resopnse body is bigger than ~65kb.

Although in this example the read data is thrown away, it must be read to avoid issues.