How to test response status for tHttpRequest

Highlighted
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

    Why Companies Move to the Cloud: 7 Success Stories

    Learn how and why companies are moving to the Cloud

    Read Now

    Agile Data lakes & Analytics

    Accelerate your data lake projects with an agile approach

    Watch

    Definitive Guide to Data Quality

    Create systems and workflow to manage clean data ingestion and data transformation.

    Download