Surprised there is no hex package with constants for http headers?

I was looking through hex and searching online and it looks like there is no library that enumerates http headers or other http constants?

1 Like

What would be the use-case for that library? Why it’d be better to use some dependency for constants instead of constants themselves?

1 Like

I looked to see if I have actually used such a module in other languages. I guess only the header names, not the header values, are encoded as constants - Network.HTTP.Types.Header . The constants aren’t that valuable. I would hope that a type analyzer could tell me if I mistyped something, with the proper annotation.

It is easy to create such a library if you feel the need, using zero arity functions as constants. Though it will only provide compilation warnings, not errors.

1 Like