httpipe icon indicating copy to clipboard operation
httpipe copied to clipboard

[Proposal] private field for the HTTPipe.Conn.t

Open stephenmoloney opened this issue 8 years ago • 2 comments

  • In order to add custom elements in a library which uses HTTPipe, I think the field private would be desirable.
  • At the moment I'm just adding my custom fields to the HTTPipe.Conn.t which is not ideal. Plug has a private field.

https://github.com/elixir-lang/plug/blob/v1.3.0/lib/plug/conn.ex#L163

@DavidAntaramian, your thoughts on this?

stephenmoloney avatar Feb 23 '17 20:02 stephenmoloney

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.

DavidAntaramian avatar Feb 23 '17 20:02 DavidAntaramian

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.

stephenmoloney avatar Feb 23 '17 21:02 stephenmoloney