Basic Info
- Faraday Version: 2.6.0
- Ruby Version: 3.1
Issue description
Please, add more documentation about middlewares ordering and priority. With detailed explanations how hooks work, I think.
Steps to reproduce
I had a code like:
Faraday.new(...) do |faraday|
faraday.request :json
faraday.response :json
faraday.response :parse_dates
end
It seems obviously for me that a response firstly being decoded from JSON, then dates will be parsed.
The gem for parsing dates BTW: https://github.com/AlexWayfer/faraday-parse_dates
But it didn't work, until I've change their order.
Why? I believe I've done everything according to middlewares documentation in the faraday-parse_dates gem.
At the https://lostisland.github.io/faraday/middleware/ I've found such documentation:
Swapping middleware means giving the other priority.
How, in which order, some examples and strict rules?
Basic Info
Issue description
Please, add more documentation about middlewares ordering and priority. With detailed explanations how hooks work, I think.
Steps to reproduce
I had a code like:
It seems obviously for me that a response firstly being decoded from JSON, then dates will be parsed.
The gem for parsing dates BTW: https://github.com/AlexWayfer/faraday-parse_dates
But it didn't work, until I've change their order.
Why? I believe I've done everything according to middlewares documentation in the
faraday-parse_datesgem.At the https://lostisland.github.io/faraday/middleware/ I've found such documentation:
How, in which order, some examples and strict rules?