spring-guides / gs-consuming-rest

Consuming a RESTful Web Service :: Learn how to retrieve web page data with Spring's RestTemplate.
https://spring.io/guides/gs/consuming-rest/
Apache License 2.0
195 stars 287 forks source link

quoters is down #47

Closed mohan3d closed 1 year ago

mohan3d commented 3 years ago

Tried to run the example but not working just realized gturnquist-quoters is down, not sure if there is a mirror for this API or hosted somewhere else to update your example.

Caused by: org.springframework.web.client.HttpClientErrorException$NotFound: 404 Not Found: [404 Not Found: Requested route ('gturnquist-quoters.cfapps.io') does not exist

ottlinger commented 3 years ago

Same here - http as well as https is not working anymore.

al3xt96 commented 3 years ago

Now it's live. I had the same problem. https://quoters.apps.pcfone.io/api/random

cmacho commented 2 years ago

API is still down

ArnaudKleinveld commented 2 years ago

https://quoters.apps.pcfone.io/api/random times out in browser. Renders this demo useless unfortunately.

ayan-b commented 2 years ago

As a temporary workaround, I am proxying a single quote response via githack.

srinivasbellarichenna commented 2 years ago

@ayan-b , could you also post the usage code snippet?

ayan-b commented 2 years ago

Replace line 30 link with this link: https://gistcdn.githack.com/ayan-b/ff0441b5a8d6c489b58659ffb849aff4/raw/e1c5ca10f7bea57edd793c4189ea8339de534b45/response.json

Essentially, replace this:

https://github.com/spring-guides/gs-consuming-rest/blob/2b4168375caa4b2ff6227b332dace8e13ab7cfd1/complete/src/main/java/com/example/consumingrest/ConsumingRestApplication.java#L27-L33

By:

public CommandLineRunner run(RestTemplate restTemplate) throws Exception {
        return args -> {
            Quote quote = restTemplate.getForObject(
                    "https://gistcdn.githack.com/ayan-b/ff0441b5a8d6c489b58659ffb849aff4/raw/e1c5ca10f7bea57edd793c4189ea8339de534b45/response.json", Quote.class);
            log.info(quote.toString());
        };
    }
Deewens commented 2 years ago

Still down, the guide needs to be updated.

jmcinerney commented 2 years ago

Looks like that endpoint is still down. Was using this to help onboard someone, but came up with the workaround to have them modify their code and point their endpoint at the service they already built in https://spring.io/guides/gs/rest-service/

Seemed like a fun way to combine two projects :man_shrugging: :slightly_smiling_face:

shyllenno commented 2 years ago

It's been an year and half that "Quoters" is down, so why keep the guide "Consuming Rest Application" online? Just take it down... It is frustrating finishing a step by step and not being able to test it. Just take it down....

HansMbua commented 2 years ago

this https://gistcdn.githack.com/ayan-b/ff0441b5a8d6c489b58659ffb849aff4/raw/e1c5ca10f7bea57edd793c4189ea8339de534b45/response.json works for me but dose not print the Quotes randomely

ayan-b commented 2 years ago

Yes, it is a static page that shows only one quote, source here.

Buzzardo commented 1 year ago

Fixed by describing how to run the quoters application locally and connect to it on localhost.