Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello @All,
I have created a small job to check how HTTP requests are working in Talend Open Studio 7.2 (Big Data) like this:
A context variable named "useHttpRequest_URL" is filled in tJava "Initialize Contexts" with URL "http://swapi.co/api/planets/3".
After that the tRest component will start for a HTTP-GET request and the response is shown in tLogRow:
I got always a 403 error code (same with component tHTTPRequest), but if I try to reach this URL via browser (chrome, ie, firefox) or via python commands I got no error code ( status code: 200 ).
I have no idea what's going wrong. Could you help, please?!
Best regards,
I.R.
hello @IR-at-CGI ,
i had issue using trest - handshake error
cant you use a trestclient ?
i made a test and i can reach the url and get the payload.
{
}
hello @IR-at-CGI ,
i had issue using trest - handshake error
cant you use a trestclient ?
i made a test and i can reach the url and get the payload.
{
}
Hi uzix,
I made a test via tRestClient like your sample and it works, but first I had to change from "http:" to "https:".
Thanks your solution is fine for me. ;o)
Before you send me an answer I made the same test with another URL "https://www.metaweather.com/api/location/2487956/2018/11/28/". In this test component tHTTPRequest and tRest is used and both works successful.
Seems that there is a issue at server-side of "swapi.co".
Any idea why these three components (tHTTPrequest, tRest, tRestClient) working different?
Best regards,
I.R.
hi @IR-at-CGI ,
this link as a good response regarding the differences in components :
https://community.talend.com/t5/Design-and-Development/tRest-v-s-tRestClient/td-p/99188