How to get Http Status Code from tHttpRequest ?

One Star

How to get Http Status Code from tHttpRequest ?

Dear Friends,
I have a question Regarding the Http Status code?
I have some temporary workflow as

tsetproxy (because tHttpRequest doesnt support proxy )-> tFileInputDelimited ->  tjavarow (to get URL) ->  tHttpRequest  -> tlogrow
I got only response content (image) from the tHttpRequest  
but is it possible to get http status code ? Example "200" 
or is any other component will help to just get response code?
i would like to do something like ?context.Http_Status_Code.equals(200)? and filter the data based on HTTP status code.
Thank you very much
krishna
One Star

Re: How to get Http Status Code from tHttpRequest ?

Hi Krishnasamy,
If you are more concerned about the status codes you can us tRestClient component as it will give you the detailed information like statusCode,body(Document),string (String). So that you can validate the response data based on the status code more easily.
Initially I also faced the same issue and resolved it with the same.
Below is the screenshot of tRestClient component.
        

15TH OCTOBER, COUNTY HALL, LONDON

Join us at the Community Lounge.

Register Now

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

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog

How Media Organizations Achieved Success with Data Integration

Learn how media organizations have achieved success with Data Integration

Read

APIs for Dummies

View this on-demand webinar about APIs....

Watch Now