Skip to content

Missing timeout option/setting #36

@melroy89

Description

@melroy89

While creating a Client object (or possibly later as well), I would like to set a time-out. Similar to ipfs-http-client:

https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#global-timeouts

Luckily there is a common option to set timeout server-side, meaning you don't need to handle time-outs client side.

Let's say you try to access a file that doesn't exist (yet) in IPFS:

curl -X POST "http://127.0.0.1:5001/api/v0/cat?arg=zb2rhe5P4gXftAwvA4eXQ5HJwsER2owDyS9sKaQRRVQPn93bA"

Introducing an additional query string (named timeout with a value of a string, including 's' for seconds for example):

curl -X POST "http://127.0.0.1:5001/api/v0/cat?arg=zb2rhe5P4gXftAwvA4eXQ5HJwsER2owDyS9sKaQRRVQPn93bA&timeout=3s"

Similar behaviour shouldn't be hard to implement in CPP-IPFS client. Just add timeout=<value> to the URL requests.

Regards,

Melroy van den Berg

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions