Maximum timeout of REST request when using setHttpTimeout
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-23-2024 10:49 AM
Hi everyone. I have some questions about RESTMessageV2 - setHttpTimeout.
What is the default value of the request timeout if I don't use setHttpTimeout?
What is the maximum value does setHttpTimeout take?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-23-2024 05:23 PM
Have you taken a look at this one:
https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB1430129
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-23-2024 07:02 PM
Hi AnirudhKumar. Thank you for your response. And yes I has looked at the document you mentioned. As I understand from the documentation below, looks like glide.http.outbound.max_timeout (default 30 s) is used in RESTMessageV2 executeAsync method. However, I want to use synchronous call with execute() method instead, and want to use setHttpTimeout().
I am wondering if I don't use setHttpTimeout(), is the default timeout is 30 seconds? And if I use it, what is the maximum value does setHttpTimeout take?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-23-2024 06:57 PM
Hi AnirudhKumar. Thank you for your response. Yes I has taken a look at it, but as I understand from the documentation below, glide.http.outbound.max_timeout (maximum value is 30 s) is used in RESTMessageV2 executeAsync method. However, I want to use synchronous call with execute() method, and I want to use setHttpTimeout() to set the timeout. I am wondering if I don't use setHttpTimeout(), is the default timeout 30 seconds? And if I use setHttpTimeout(), what is the maximum value does the method take?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-23-2024 07:06 PM
Hi @Chau Vo ,
Please check the below post:
Mark this as Helpful / Accept the Solution if this helps.