fsprojects / FsHttp

A lightweight F# HTTP library by @SchlenkR and @dawedawe
https://fsprojects.github.io/FsHttp/
Apache License 2.0
424 stars 42 forks source link

Am I using `Config.timeoutInSeconds` wrong? #113

Closed jmhickman closed 1 year ago

jmhickman commented 1 year ago
GlobalConfig.defaults
|> Config.timeoutInSeconds 28.5
|> GlobalConfig.set

When I set this like above, I'm only receiving approximately a 10 second timeout. Is there some maximum value, or is there something I'm doing wrong in globally setting the value?

The reason the timeout is so long is because I'm interacting with a program that will wait on user input, and it might actually take this long for the user to do what they need to do, and thus have the program send me a response to my request.

SchlenkR commented 1 year ago

The usage shown above is correct - it's intended to be used in that way. But there likely seems to be an issue with timeouts that has to be investigated,

jmhickman commented 1 year ago

I'm able to get the desired behavior when I include a config_timeoutInSeconds 28.5 inside the computation, so the underlying mechanism seems to be working. But I figured it would be cleaner to use the global setting since the timeout isn't dynamic in any way.

SchlenkR commented 1 year ago

This is also related to #37 (see comments).