Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
VenkyM
Contributor
Contributor

how to valid if an URL is active

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

Labels (4)
1 Reply
Anonymous
Not applicable

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