Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Maximum timeout of REST request when using setHttpTimeout

Chau Vo
Tera Contributor

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?

5 REPLIES 5

AnirudhKumar
Mega Sage

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?

 

https://docs.servicenow.com/bundle/tokyo-application-development/page/integrate/web-services/referen...

Chau Vo
Tera Contributor

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?

 

https://docs.servicenow.com/bundle/tokyo-application-development/page/integrate/web-services/referen...

SN_Learn
Kilo Patron
Kilo Patron

Hi @Chau Vo ,

 

Please check the below post:

https://www.servicenow.com/community/developer-forum/how-to-increase-the-timeout-for-a-rest-response... 

https://www.servicenow.com/community/developer-articles/outbound-integrations-using-soap-rest-perfor... 

 

----------------------------------------------------------------
Mark this as Helpful / Accept the Solution if this helps.