midas-framework / midas

A framework for Gleam, Midas makes shiny things.
https://hex.pm/packages/midas
190 stars 5 forks source link

Store parsed headers, e.g. content length #5

Open CrowdHailer opened 4 years ago

CrowdHailer commented 4 years ago

It's only a valid content-length if correctly parses as an integer. Is there a way to save this fact in the request type.

CrowdHailer commented 4 years ago

https://tools.ietf.org/html/rfc2616 defines general headers request/response headers and entity headers. extension headers are ones that are not specified in the spec. It could be possible to specify an enum of headers than includes entity header for unknown headers