lostisland / faraday

Simple, but flexible HTTP client library, with support for multiple backends.
https://lostisland.github.io/faraday
MIT License
5.75k stars 981 forks source link

docs: Add one more require to the quickstart to make this whole thing work immediately #1401

Closed joshuabremerdexcom closed 2 years ago

joshuabremerdexcom commented 2 years ago

Description

I wanted the quickstart to work with no thinking. I got confused when I copied in the original code and got the following:

/Users/jbremer/.rvm/gems/ruby-2.7.5/gems/faraday-net_http-2.0.1/lib/faraday/net_http.rb:8:in `<module:NetHttp>': undefined method `register_middleware' for Faraday::Adapter:Class (NoMethodError)

In hindsight, it's pretty obvious that I forgot to require faraday, but I like it when quickstarts give you everything you need to get your "hello world" to run, and then adds onto that afterwards.

Todos

None!