trestrequest not working

Five Stars

trestrequest not working

Hi,

 

I have one API which supports GET with no parameters

 

Its worked with trest and trestclient successfully.

 

But when I use with trestrequest it always shows error like this

 

java.net.BindException: Cannot assign requested address: bind java.net.BindException: Cannot assign requested address: bind

 

Here is my API's url

http://www.mocky.io/v2/5a1fcfa7310000b316c0afbd  (You can also try)

 

Any suggestions please ?

Moderator

Re: trestrequest not working

Hello,

Could you please show us the full stack trace?

Is there any port already occupied on your machine?

Best regards

Sabrina

--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
Five Stars

Re: trestrequest not working

Hi Sabrina

 

The thing is the API am calling is not deployed on the server from where am calling. And according the docs, Its says tRestrequest is a server based component.

 

So tell me please am allowed to call API whose webserver sits on another location using this component ?

Community Manager

Re: trestrequest not working

Hi
tRestRequest is a server based component, it is used to build a Rest Web Service, it is not a Rest client tool. To call a Rest Web Service, you should use tRest or tRestClient as you did.

Regards
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business

What’s New for Talend Spring ’19

Watch the recorded webinar!

Watch Now

Definitive Guide to Data Quality

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

Download

Tutorial

Introduction to Talend Open Studio for Data Integration.

Watch

Downloads and Trials

Test drive Talend's enterprise products.

Downloads