Select to view content in your preferred language

Esri Request timeout parameter

6136
2
Jump to solution
06-17-2015 02:08 AM
RyanSmith1
Deactivated User

Hi Guys,

I'm using the esri request to retrieve layer Info from a map service. The call works fine and i'm able to retrieve the data, however now i want to check if url provided to make the request is valid or not. I've tried using the "timeOut" parameter but it only throws an error after 1 minute which i understand is the default setting. Any ideas?

Thanks, Ryan

I've tried the following code:

esriRequest({
"url": url,
"callbackParamName": "callback",
"content": { "f": "json" },
"handleAs": "json",
"timeOut": 5000
});
Tags (1)
0 Kudos
1 Solution

Accepted Solutions
YousefQuran
Frequent Contributor

Hi Ryan Smith,

Did you try to change the defaults ?

esri.config.defaults.io.timeout = 5000;

Try it, please.
Anyways, Hope this help you.

Regards,
Yusuf

View solution in original post

0 Kudos
2 Replies
YousefQuran
Frequent Contributor

Hi Ryan Smith,

Did you try to change the defaults ?

esri.config.defaults.io.timeout = 5000;

Try it, please.
Anyways, Hope this help you.

Regards,
Yusuf

0 Kudos
RyanSmith1
Deactivated User

Hi Yusuf,

That worked for me. Thanks!

Regard,

Ryan