snoyberg / http-enumerator

HTTP client package with enumerator interface and HTTPS support.
27 stars 9 forks source link

Expose Request constructor, useful for pattern matching. #39

Closed yihuang closed 13 years ago

yihuang commented 13 years ago

Thanks very much.

snoyberg commented 13 years ago

This is done on purpose to allow future enhancements to the API without breaking backwards compatibility. See http://www.yesodweb.com/blog/2011/10/settings-types for more details.

yihuang commented 13 years ago

So we can't use -XRecordWildCards pattern matching on Request? e.g.

showReq Request{..} = ...

snoyberg commented 13 years ago

Correct. Request is intended as settings to be passed to http-enumerator, not for analysis by any other program. It could add new fields at any point.