-
Notifications
You must be signed in to change notification settings - Fork 184
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Display requests and responses? #220
Comments
Add this to your base class: Base.connection do | connection |
connection.use Faraday::Response::Logger
end The above will output the raw request and response text to stdout. |
Yes, I'd already tried that. It displays the url for the POST/PATCH, but not the body, so it's a bit useless. However I got around the problem by following the guidelines on how to get VCR to work in #171. So I just had to look at the yml files created by VCR to see what was being sent and that solved my problem. So I'll close this, |
Oh, yeah forgot about that, I ended up using a gem that included bodies: Base.connection do | connection |
connection.use DetailedLogger
end and more recently found out that Faraday includes it with a little manipulation: Faraday.new do |faraday|
faraday.response :logger, ::Logger.new(STDOUT), bodies: true
end ref: faraday pull request |
Any idea how I can get it to display the full request and response?
It's doing something wrong when interacting with an API I don't have control over and can't see what's coming through. So I need to see what's being sent.
The text was updated successfully, but these errors were encountered: