Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I want to know what components or logic that I use to check if an URL is active and up and running.
For example, if I type "https://community.talend.com" on a browser, I get to see the content if the url is up and running. otherwise, i find an error (not found or not valid).
I tried DI trestclient which returned the body was not found. I do not need to retrieve any body. I just need to check if the url is active.
any help will be appreciated.
Thanks,
Venky
Hi
You can try tHttpRequest component, link it to a tJavaRow and check the ResponseContent value, if it is null, means the URL is inactive.
For example:
tHttpRequest--main--tJavaRow.
Uncheck the 'die on error' option on tHttpRequest.
on tJavaRow:
if(input_row.ResponseContent==null){
System.out.println("the URL is inactive");
}
Regards
Shong