[web-devel] Proposal: http-types
Michael Snoyman
michael at snoyman.com
Thu Feb 3 04:08:15 CET 2011
Maybe I should have been more conservative in my previous comments:
assuming that this http-types package is not vastly different than
what I'm already using I can support it. I have no intention of
breaking API compatibility for no reason. Neither change you've
mentioned so far (Method and ditching CIByteString) seems like a wise
move to me.
It seems prudent to point out that WAI started off closer to the
package you're designing now, and after input from others and some
experience got to where it is now. I don't want it to take a step
backwards.
Michael
On Thu, Feb 3, 2011 at 12:53 AM, Aristid Breitkreuz
<aristidb at googlemail.com> wrote:
> I'm not sure how to proceed with the Headers type. Or specifically the
> Header name type.
> WAI uses CIByteString, but I'm not sure if this approach can find a
> consensus...
> How should I proceed?
>
> Aristid
>
> 2011/2/2 Michael Snoyman <michael at snoyman.com>
>>
>> I think there's general consensus that this package would be a Good
>> Thing(tm), and at the least you'll have my support on it. I'm sure we
>> can all quibble on details later, but I think the best thing now would
>> be to have some actual code to look at.
>>
>> Aristid, I'm assuming (hoping) you were volunteering to actually write
>> and maintain this package, is that correct? I would recommend you get
>> a project started (Github, BitBucket, PatchTag, wherever), getting up
>> some code and then we can all nit-pick it to death ;).
>>
>> Michael
>>
>> On Wed, Feb 2, 2011 at 3:45 PM, Aristid Breitkreuz
>> <aristidb at googlemail.com> wrote:
>> > http-enumerator could at least for compatibility support a Request type
>> > with
>> > ByteString. And also a native request type. Or something along these
>> > lines.
>> > The problem is that I want to be able to use a Request type that is
>> > compatible between multiple client libraries, enabling me to
>> > theoretically
>> > switch implementations without a huge amount of hassle.
>> >
>> > Aristid
>> >
>> > 2011/2/2 Michael Snoyman <michael at snoyman.com>
>> >>
>> >> On Wed, Feb 2, 2011 at 2:50 PM, Aristid Breitkreuz
>> >> <aristidb at googlemail.com> wrote:
>> >> > I agree with most things.
>> >> >
>> >> > 2011/2/2 Michael Snoyman <michael at snoyman.com>
>> >> >>
>> >> >> * Request and response datatypes themselves. I don't think this
>> >> >> makes
>> >> >> sense to put in http-types: just between WAI and http-enumerator I
>> >> >> needed different versions of these.
>> >> >
>> >> > I think this is where we could derive most value, and it would be
>> >> > good
>> >> > to
>> >> > find a way to do it.
>> >> > Request actually looks pretty similar in WAI as in http-enumerator,
>> >> > but
>> >> > Response is different. Maybe distinguish between client and server
>> >> > versions
>> >> > of Response?
>> >>
>> >> I'd be very surprised if those two can be meaningfully unified. What
>> >> do you do about remoteHost and errorHandler? Also, it's more useful to
>> >> have the request body for http-enumerator be an Enumerator of
>> >> Builders, as opposed to WAI where we want an Enumerator of
>> >> ByteStrings.
>> >>
>> >> I have no opposition to *having* a Request type in http-types (or
>> >> whatever we call it), but I doubt anyone will actually use it, and I
>> >> wouldn't even want it to include Builder due to the extra dependency.
>> >>
>> >> Michael
>> >
>> >
>
>
More information about the web-devel
mailing list