Skip to content

Commit

Permalink
README: Fixed a code typo (#975)
Browse files Browse the repository at this point in the history
  • Loading branch information
Hubro authored and olleolleolle committed Apr 27, 2019
1 parent be09719 commit 3abe9d1
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions README.md
Expand Up @@ -76,15 +76,14 @@ class MyFormatter < Faraday::Response::Logger::Formatter
info('Request', env)
end

def request(env)
def response(env)
info('Response', env)
end
end

conn = Faraday.new(:url => 'http://sushi.com/api_key=s3cr3t') do |faraday|
faraday.response :logger, StructLogger.new(STDOUT), formatter: MyFormatter
end

```

Once you have the connection object, use it to make HTTP requests. You can pass parameters to it in a few different ways:
Expand Down

0 comments on commit 3abe9d1

Please sign in to comment.