Re: [go-nuts] HTTP timeout per handler

2019-10-01 Thread Nitin Sanghi
t of 1 minute but allowing a certain > user to download a large file for 30 min. > > El mar., 1 oct. 2019 a las 6:31, Nitin Sanghi () > escribió: > >> Santiago, you can use context to cancel the request after the certain >> time you like. >> >>

Re: [go-nuts] HTTP timeout per handler

2019-10-01 Thread Nitin Sanghi
Santiago, you can use context to cancel the request after the certain time you like. ctx, cancel := context.WithTimeout(ctx, 100*time.Millisecond) defer cancel() // releases On Mon, Sep 30, 2019, 8:54 PM Santiago Corredoira wrote: > Using the http package, timeouts are defined