If we use third party services in our application, we have make to from a few to a lot of HTTP requests. And in consuming them, while making those HTTP requests, we should carefully set a timeout. Because if the server does not respond within this time for any reason, we cannot keep waiting for it to respond. If we do not have a timeout set, our entire system becomes stalled. Even if it is not fully stuck, the service is just too slow, that too could accumulate a lot of tasks on our queue.

A timeout saves us from a disaster and gives control over how to handle such issues. When a timeout is triggered, we can report an error, set a retry policy or move on as per our priority.

We have introduced a timeout feature in our new version of Aspose.Slides Cloud 19.6 along with many other important improvements and fixes. It will provide users more control on the API calls and plan their fall back policy accordingly. In subsequent paragraphs we will shed some light on the timeout feature of Aspose.Slides Cloud. For complete details of new improvement and fixes, please check the release notes of this version.

You can set timeout for any operation of Aspose.Slides using x-aspose-timeout header parameter, implemented in the current version. It can be used with any method and resource. It is an integer number specifying timeout (in seconds) for a request. It applies not to the overall Web request, but to the operation in Aspose.Slides on the server. An operation taking too long will be cancelled with an exception if it is taking too long. Please note Aspose.Slides Cloud timeout is counted only from the moment when the operation is started on the server.

Let us demonstrate how you can set a timeout of HTTP API request. We are using cURL command for the purpose, however, you can also use Aspose.Slides Cloud SDK of your choice. You need to set timeout property of configuration object. Please refer to the complete list of available SDKs to use Aspose.Slides Cloud API directly in your favorite platform.

Get JWT Authentication Token

Representation of a Presentation

Got a question or Bug? Please feel free to drop us a comment below or post a question in support forum. It helps us to continually improve and refine our API.

Still haven’t tried Aspose.Slides Cloud? The free trial is right here waiting for you to give it a try and explore the power of the Comparison REST API. All you need is to sign up with the aspose.cloud.