middleware example: print out both headers and options #535
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I was looking at https://hexdocs.pm/tesla/Tesla.Middleware.html docs that were for 1.4.4 and noticed that the middleware example doesn't work. I wanted to fix it, but noticed that here on GitHub this code is already updated, but it still has some issues. I can imagine that originally it was indeed intended to use middleware options as options for
IO.inspect/2
but I am more inclined to believe that options were passed to IO.inspect just so the compiler wouldn't complain about the unused variable :) so I think it would be better to either print the options out or just remove them completely and replace them with_options
.p.s. the first time I'm contributing to this project. So I will use this opportunity to say that your library is very cool and I'm happy using it :)