How to test response status for tHttpRequest

One Star

How to test response status for tHttpRequest

I have an iteration on a tHttpRequest and I want to test if the request returned a 200 (success) and write all other response in a output file.

I do not find any documentation how to test that, and it seems the string "ResponseContent" contains only the body of the response.

Thanks for help
One Star

Re: How to test response status for tHttpRequest

Hi

Sorry. The tHttpRequest component can not get return status now.

Regards,
Pedro
One Star

Re: How to test response status for tHttpRequest

I've found two hard ways to know if tHttpRequest request succeeded.
[list=1]
  • use "Write response content to file": if the request succeded a file will be written with the response content, otherwise no file;

  • redirect System.err to a file in a tJava before tHttpRequest: in that file I'll find failing urls or http messages.

  • Seventeen Stars

    Re: How to test response status for tHttpRequest

    hi ruggdam,

    thanks for sharing Smiley Wink
    regards
    laurent
    One Star

    Re: How to test response status for tHttpRequest

    Hi Guys,

    Can anyone Help me? I'm trying to use the tHttpRequest but I always get a Connection Refused Error. Is there any configuration that is need to be set up ??  TIA

    Regards,
    John 

    2019 GARNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

    Talend named a Leader.

    Get your copy

    OPEN STUDIO FOR DATA INTEGRATION

    Kickstart your first data integration and ETL projects.

    Download now

    What’s New for Talend Summer ’19

    Watch the recorded webinar!

    Watch Now

    Have you checked out Talend’s 2019 Summer release yet?

    Find out about Talend's 2019 Summer release

    Blog

    Talend Summer 2019 – What’s New?

    Talend continues to revolutionize how businesses leverage speed and manage scale

    Watch Now

    6 Ways to Start Utilizing Machine Learning with Amazon We Services and Talend

    Look at6 ways to start utilizing Machine Learning with Amazon We Services and Talend

    Blog