axum-server icon indicating copy to clipboard operation
axum-server copied to clipboard

New example setting a header read timeout

Open josecelano opened this issue 1 year ago • 0 comments

I'm trying to build an example where the connection is automatically closed after 5 seconds.

It's not working.

I was able to do it directly with hyper with the echo example in the hyper repo.

Here are the changes I made to that example. I guess there must be a way to apply the same changes using axum-server.

In this example, I'm using the hyper_util::rt::TokioTimer. The hyper example uses

https://github.com/josecelano/hyper/blob/master/benches/support/tokiort.rs

josecelano avatar Jul 05 '24 16:07 josecelano