Hi,
We are having some issues with a REST service we call from Ebase using a REST-resource. The service works ok, but it takes a long time to complete. So we are getting timeouts, while in fact the service responses with 200 a bit later.
Is it possible to set the timeout for this resource?
Regards,
David
Is it possible to set the timeout time for a REST resource?
Moderators: Jon, Steve, Ian, Dave
- dvanhussel
- Ebase User
- Posts: 161
- Joined: Fri Oct 19, 2007 12:45 pm
- Location: Haarlem, the Netherlands
-
- Moderator
- Posts: 1342
- Joined: Wed Sep 12, 2007 12:49 pm
Re: Is it possible to set the timeout time for a REST resource?
You can do this using the services.rest API, all the methods accept a RestOptions object as the last parameter and you can specify both socket timeout and connection timeout using this e.g.
Code: Select all
var opts = new RestOptions();
opts.socketTimeout= 600; // 10 mins
var response = services.rest.get(uri, headers, null, null, opts);
0 x
- dvanhussel
- Ebase User
- Posts: 161
- Joined: Fri Oct 19, 2007 12:45 pm
- Location: Haarlem, the Netherlands
Re: Is it possible to set the timeout time for a REST resource?
Hi Jon,
Sorry for not mentioning that I knew that this can be solved this way. But we allready have a working resource and was wondering if I could keep using that and set the timeout.
I will refactor this to using your suggestion.
Regards,
David
Sorry for not mentioning that I knew that this can be solved this way. But we allready have a working resource and was wondering if I could keep using that and set the timeout.
I will refactor this to using your suggestion.
Regards,
David
0 x
-
- Moderator
- Posts: 1342
- Joined: Wed Sep 12, 2007 12:49 pm
Re: Is it possible to set the timeout time for a REST resource?
No, sorry. There isn't a way to do this using a resource.
0 x
Who is online
Users browsing this forum: No registered users and 8 guests