httpipe
httpipe copied to clipboard
[Proposal] private field for the HTTPipe.Conn.t
- In order to add custom elements in a library which uses
HTTPipe, I think the fieldprivatewould be desirable. - At the moment I'm just adding my custom fields to the
HTTPipe.Conn.twhich is not ideal. Plug has aprivatefield.
https://github.com/elixir-lang/plug/blob/v1.3.0/lib/plug/conn.ex#L163
@DavidAntaramian, your thoughts on this?
That would probably be a good idea. Though perhaps private is a bad choice since it implies it's reserved for HTTPipe's use? I am thinking something like custom_fields and recommending that users namespace it to their application.
Yea, custom_fields sounds good and +1 for recommending namespacing with it (to avoid potential conflicts).
If you need me to contribute, let me know.