inaka / Dayron

A repository `similar` to Ecto.Repo that maps to an underlying http client, sending requests to an external rest api instead of a database
http://inaka.net/blog/2016/05/24/introducing-dayron/
Apache License 2.0
159 stars 20 forks source link

Support a pipeline of "plugs" to change request/response #46

Open flaviogranero opened 8 years ago

flaviogranero commented 8 years ago

The idea here is have a kind of plug and pipelines support. It would be something like faraday middlewares from ruby. With the solution, we would be able to change the request data before it's sent, and change the response data after the request but before the mapping to a struct. I did a quick research if we could use Plug structure for that, but in my opinion it does not support all response data or error handling we need.