Skip to content
This repository has been archived by the owner on Jun 19, 2024. It is now read-only.

Not able to access ratesApi from my local spring boot app #20

Open
RameshbabuAnanthrapu opened this issue Jul 27, 2020 · 0 comments
Open

Comments

@RameshbabuAnanthrapu
Copy link

Hi,

I am not sure if this is an issue or not. My apologize if it is not.

My issue is:

I am able to access below URI(both http and https) from postman and from my browser but not from my local spring boot app which is running on windows.

Rest endpoint that i am trying to access:

https://api.ratesapi.io/api/latest.

Can you please help me if I have to add any additional parameters to make this call from Spring Boot Rest Template or Spring Boot Feign client?

Your help is highly apreciated.

Please find the exception below:

org.springframework.web.client.HttpClientErrorException$Forbidden: 403 Forbidden: [error code: 1010]
at org.springframework.web.client.HttpClientErrorException.create(HttpClientErrorException.java:109) ~[spring-web-5.2.8.RELEASE.jar:5.2.8.RELEASE]
at org.springframework.web.client.DefaultResponseErrorHandler.handleError(DefaultResponseErrorHandler.java:184) ~[spring-web-5.2.8.RELEASE.jar:5.2.8.RELEASE]
at org.springframework.web.client.DefaultResponseErrorHandler.handleError(DefaultResponseErrorHandler.java:125) ~[spring-web-5.2.8.RELEASE.jar:5.2.8.RELEASE]
at org.springframework.web.client.ResponseErrorHandler.handleError(ResponseErrorHandler.java:63) ~[spring-web-5.2.8.RELEASE.jar:5.2.8.RELEASE]
at org.springframework.web.client.RestTemplate.handleResponse(RestTemplate.java:782) ~[spring-web-5.2.8.RELEASE.jar:5.2.8.RELEASE]
at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:740) ~[spring-web-5.2.8.RELEASE.jar:5.2.8.RELEASE]
at org.springframework.web.client.RestTemplate.execute(RestTemplate.java:674) ~[spring-web-5.2.8.RELEASE.jar:5.2.8.RELEASE]
at org.springframework.web.client.RestTemplate.exchange(RestTemplate.java:583) ~[spring-web-5.2.8.RELEASE.jar:5.2.8.RELEASE]
at com.example.exchangeRateViewer.api.RateViewController.loadExchangeRates(RateViewController.java:32) ~[classes/:na]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_251]

Thank you.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant