[web-devel] ALPHA: http-types 0.1
michael at snoyman.com
Fri Feb 4 07:09:13 CET 2011
Alright, everything seems fine to me. Some more comments:
* Besides the fact that I think HttpCIByteString is too verbose, it
presents another problem: I cannot transparently switch over to it in
WAI and http-enumerator. If you kept the same name (CIByteString), I
could simply switch over to your version without any breaking changes.
* I like methodGet et al.
* Do you want to consider some parsing functions? I can provide you
the code. Some things I would imagine would be:
* parseQueryString :: ByteString -> [(ByteString, Maybe
ByteString)] (I'm not sure if in practice anyone cares about the Maybe
btw, but you are right that it is more theoretically correct)
* renderQueryString :: [(ByteString, Maybe ByteString)] -> ByteString
* parsePath :: ByteString -> [String], which would do all
splitting-on-slash, percent decoding and UTF-8 decoding
* renderPath :: [String] -> ByteString, which would be the reverse
* renderPathQuery :: [String] -> [(ByteString, ByteString)] -> ByteString
* parseHttpAccept :: ByteString -> [ByteString]
* Are you planning on adding headers as well?
Basically, feel free to raid Network.Wai.Parse.
On Fri, Feb 4, 2011 at 12:23 AM, Aristid Breitkreuz
<aristidb at googlemail.com> wrote:
> OK, I uploaded a fixed version:
> Good night!
> 2011/2/3 Aristid Breitkreuz <aristidb at googlemail.com>
>> Status 700 "Crazy status"
>> ... but I forgot to export the Status constructor. That was an oversight.
>> I made the same error with HttpVersion.
>> 2011/2/3 Michael Snoyman <michael at snoyman.com>
>>> On Thu, Feb 3, 2011 at 11:42 PM, Aristid Breitkreuz
>>> <aristidb at googlemail.com> wrote:
>>> > Hi,
>>> > I just wanted to announce that I uploaded a first version of http-types
>>> > to
>>> > hackage:
>>> > http://hackage.haskell.org/package/http-types-0.1
>>> > This version is very much an Alpha version. And, uh, do give feedback:
>>> > I
>>> > promise that I will keep myself better in check, this time.
>>> > Aristid
>>> > _______________________________________________
>>> > web-devel mailing list
>>> > web-devel at haskell.org
>>> > http://www.haskell.org/mailman/listinfo/web-devel
>>> Quick question: how do you create new statuses?
More information about the web-devel