Help on uri module

Hello All,
I would like to fetch some data using uri module, but little concern is that uri module should wait for 30 second to complete to load the page (page has same dynamic data which required 30 second to load (asp) )

How do i meet this requirement.

Thanks in Advance.

Regards
GG.

https://docs.ansible.com/ansible/latest/modules/uri_module.html#parameter-timeout

request.

timeout
integer

Default:

30

The socket level timeout in seconds

“Socket Timeouts. … Socket timeouts can occur when attempting to connect to a remote server, or during communication, especially long-lived ones. They can be caused by any connectivity problem on the network, such as: A network partition preventing the two machines from communicating. The remote machine crashing.”

In my case connection is getting established.

I would like to wait uri connection till load the page and then return the static and dynamic values
"

Are you actually running into a problem? Also, the timeout parameter affects all blocking operations, including recv/read.

The optional timeout parameter specifies a timeout in seconds for
blocking operations like the connection attempt (if not specified, the
global default timeout setting will be used). This only works for HTTP,
HTTPS and FTP connections.

I created a toy webapp, that would sleep for a random period of time between 60 and 120s. At the default 30s it would fail, I extended the timeout to 120s, and it works as expected every time.

Thank you Matt and Visser
I will check and let you know.

No luck, output is coming immediately even I set to timeout: 120

Hello All,
I would like to fetch some data using uri module, but little concern is that uri module should wait for 30 second to
complete to load the page (page has same dynamic data which required 30 second to load (asp) )

How does the page load the dynamic data? The uri module retrieves only the page but the dynamic data is probably loaded
by Javascript.

Regards
         Racke

Its asp page which check if application running or down

Its asp page which check if application running or down

And there is no other way to retrieve this information?

uri module wouldn't help as it doesn't trigger the retrieval of dynamic data, you need
a (headless) browser for that.

Regards
         Racke

Thanks Racke.

now I am using python with selenium module to achieve this task

Thanks to everyone