Ask a Question

Am getting connection refused error in ready API

SOLVED
Parthib
New Contributor

Am getting connection refused error in ready API

When am sending the below two different URL in single http request am getting connection refused error in Ready API

 

Sample Request URL :

 

https://d.org/k/o/r/r/r/a-n-i/a?client_id=a&response_type=c&scope=o%2%20ect_uri=http://localhost:420...

 

Note : Since due to business policy i have not share the original URL Details

 

Error Message:

 

2022-06-23 19:01:40.678 - Error getting response; org.apache.http.conn.HttpHostConnectException: Connect to localhost:4200 [localhost/127.0.0.1, localhost/0:0:0:0:0:0:0:1] failed: Connection refused: connect

 

 

7 REPLIES 7
ChrisAdams
Community Leader

Hi,

Is the second URL a parameter for the API or are you trying to call two different URLs in the same request?

Parthib
New Contributor

Hi,

 

Thanks for Quick Response

 

Its a two different URL in single request

ChrisAdams
Community Leader

Hi,

 

In short, you cannot call two URLs in a single test request.  You need to make a test request per URL to test different URLs.

 

If you have the licensed ReadyAPI, then look at Environments.  That might help with different URLs.

 

For example, if you have a getCustomer API in a Dev and Test environment.  Then you would have two different URLs and you can switch between the two.

Parthib
New Contributor

Hi,

 

Yes am licensed user of Ready API understood the switching between the two environment,

 

But here in the same request when i tryied to perform scenario in POSTMAN that's giving the expected response.

 

Is any other option to test in ReadyAPI even i tried to pass the another URL in request parameter that also not working now.

 

Thanks,

Parthib

Parthib
New Contributor

Hi, 

 

Another issue is when am sending the request with below parameters

 

Parthib_0-1656071084819.png

 

After checking request raw it displayed as below format value.

 

Parthib_1-1656071122050.png

 

Could you please help me out to solve this issue.

 

Thanks,

Parthib

ChrisAdams
Community Leader

,

 

So the second URL is a parameter, it's redirect_uri.  OK, let me have a look.

ChrisAdams
Community Leader

Hi,

 

I've managed to send a URL in the request params.

ChrisAdams_0-1656075956264.png

 

Note the type, for me I use Query and not Template.

 

And my raw request....

ChrisAdams_1-1656076066351.png

 

I know Postman uses {} to interpolate, but it's not required here.

 

You can though interpolate, but ReadyAPI uses ${} and not {}.

 

E.g. I have set up a custom property for my test under the Test Suite name...

 

ChrisAdams_2-1656076307747.png

 

Then, in the test step....

 

ChrisAdams_4-1656076383302.png

 

And finally, in the raw request tab....

ChrisAdams_5-1656076439916.png

 

 

 

 

 

 

cancel
Showing results for 
Search instead for 
Did you mean: