Skip to content
This repository has been archived by the owner on Jan 24, 2021. It is now read-only.

Typed Properties for well-know Http Headers #127

Closed
pcibraro opened this issue Apr 18, 2011 · 2 comments
Closed

Typed Properties for well-know Http Headers #127

pcibraro opened this issue Apr 18, 2011 · 2 comments
Assignees
Milestone

Comments

@pcibraro
Copy link
Contributor

I think it would be very useful to have typed properties for all the well-know request and response headers (Accept, Authorization, etc). Today is a simple IDictionary<string, IEnumerable for the request and a IDictionary<string, string> for the response (Which is wrong I think as you can have multiple values for an specific header. For example, Accept-Ranges).

I can contribute this as a patch if you are interested.

Thanks
Pablo.

@thecodejunkie
Copy link
Member

Yeah I think it's a pretty nice idea to have the common headers exposed in a typed fashion.. in fact i think the headers could be stored in a dynamicdictionary and layer ontop a set of conventions ..like removing - in a header name...

that way you could do Header.AcceptRanges without having to hardcode in the typed nature of it. The DynamicDictionary is a type in Nancy..

@ghost ghost assigned thecodejunkie Jul 7, 2011
@thecodejunkie
Copy link
Member

Resolved

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants