Faraday: Sample domain in Faraday docs needs to be updated

Created on 9 Jul 2020  ·  3Comments  ·  Source: lostisland/faraday

Basic Info

  • Faraday Version: All
  • Ruby Version: All

Issue description

Faraday docs use sushi.com as a sample domain for code examples. However, it appears registration for the domain lapsed at some point, and it was grabbed by a domain name scalper.

As a result, many of the existing code examples either don't work at all or produce divergent output from the docs.

For instance, the very first code example:

Make a simple GET request by requiring the Faraday gem and using Faraday.get:

response = Faraday.get 'http://sushi.com/nigiri/sake.json'

This returns a Faraday::Response object with the response status, headers, and body.

response.status
# => 200

In fact, this returns a 301 because the new host for the sushi.com domain is redirecting http requests to https. If you follow the redirect via Faraday (with the extra required code), you'll eventually get a 404 because sake.json no longer exists on the domain.

Steps to reproduce

See above.

documentation good first issue

Most helpful comment

Okay, cool. I can take this one on.

All 3 comments

Thanks @mokolabs for raising this.
Having those examples working is not really too important, they're mostly there for illustration purposes.
That said, I agree with you it would be even better if they actually worked 😃
I used example.com in the past but that also looks down at the moment!
Maybe we could use Postman Echo, or I'm open to other suggestions.

I'd also be glad if someone from the community would like to pick this up, I'll flag it as a good first issue 👍

Okay, cool. I can take this one on.

I use httpbingo.org extensively in both docs and tests. It's a go port of the old httpbin.org service. Great resource if you haven't seen it before. I even simulate it in my tests with webmock...

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mvastola picture mvastola  ·  4Comments

silviusimeria picture silviusimeria  ·  5Comments

olleolleolle picture olleolleolle  ·  5Comments

iMacTia picture iMacTia  ·  3Comments

zenspider picture zenspider  ·  8Comments