drogue-iot / reqwless

Rust async HTTP client for embedded/no_std
Apache License 2.0
123 stars 14 forks source link

Expandable rx_buf? #67

Open stevefan1999-personal opened 8 months ago

stevefan1999-personal commented 8 months ago

What if I can supply a Vec<u8> and won't have to expand the buffer and retry the request again?

Example code in question: https://github.com/stevefan1999-personal/rust-igd/blob/e52d615a395e25b9134cea56e1d3225317d868ea/src/aio/mod.rs#L47-L70

lulf commented 1 month ago

Reqwless must work on no_std, so it cannot handle a Vec. Note that you really only need the rx_buf to be at least as big as the response headers. The rx_buf can be reused reading chunks of the response body.