Ktor: [ktor-common-client] Custom timeouts

Created on 15 Nov 2018  路  8Comments  路  Source: ktorio/ktor

Hello guys! I've detected that the timeout feature/option is not available yet in the common ktor client.

Could you please add it?

Thanks!

enhancement up for grabs

Most helpful comment

Hi @Syrou, @nehahemnani92, @sergiocasero. Thanks for the report!
It looks like the most cases could be covered by:

withTimeout(...) {
    client.get<Data>(...)
}

What kind of timeout would you like to see?

All 8 comments

@e5l Any news on this? I really need this feature for MPP common client

@e5l Is there a plan to add this enhancement in the near future?

Hi @Syrou, @nehahemnani92, @sergiocasero. Thanks for the report!
It looks like the most cases could be covered by:

withTimeout(...) {
    client.get<Data>(...)
}

What kind of timeout would you like to see?

Ohh, looks pretty nice @e5l , let me check it because I think that yes, this will cover the 90% of cases.

@e5l Pretty sure what I want is to have that ability from the configuration phase. Sure it works setting it on each request/call but I'd want to be able to define a default timeout in the configuration step and then override that by using the withTimeout(...)

Please check the following ticket on YouTrack for follow-ups to this issue. GitHub issues will be closed in the coming weeks.

Obsolete with timeouts feature: https://ktor.io/docs/timeout.html

Was this page helpful?
0 / 5 - 0 ratings

Related issues

diaodou picture diaodou  路  3Comments

lamba92 picture lamba92  路  3Comments

baruchn picture baruchn  路  3Comments

gabin8 picture gabin8  路  4Comments

evgfilim1 picture evgfilim1  路  4Comments