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

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

An API-First Approach to Modernizing Applications

Learn how to use an API-First Approach to Modernize your Applications

Watch Now

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog

Talend API Designer – Technical Overview

Take a look at this technical overview video of Talend API Designer

Watch Now