-
Notifications
You must be signed in to change notification settings - Fork 50
Closed
Labels
Description
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