[swift-server-dev] HTTP API v0.1.0
Helge Heß
me at helgehess.eu
Tue Nov 7 12:48:43 CST 2017
On 7. Nov 2017, at 17:02, Cory Benfield <cbenfield at apple.com> wrote:
>> On 7 Nov 2017, at 15:56, Helge Heß via swift-server-dev <swift-server-dev at swift.org> wrote:
>>
>> On 7. Nov 2017, at 16:51, Georgios Moschovitis <george.moschovitis at icloud.com> wrote:
>>>
>>> There is also
>>>
>>> e) writeHeader => writeHead
>>
>> The current API uses writeHeader for all headers. (writeHead sounds more like the one single response header). Though I agree it is in line with HTTPRequestHead 🤔
>
> If you want to be really pedantic, you are writing one response header section. The individual elements of the header section are the response line and zero or more header *fields*.
>
> Of course, and I can not stress this enough, these are all details that should not particularly factor in to your decision. They’re absurdly pedantic.
I like that ;-)
writeHeader(status:headers:)
writeHeader(method:target:headers:)
Look good to me, though I would prefer to have a distinct method for the continue and alike, so that the implementation can guard against usage errors.
hh
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 874 bytes
Desc: Message signed with OpenPGP
URL: <https://lists.swift.org/pipermail/swift-server-dev/attachments/20171107/cdedf3b0/attachment.sig>
More information about the swift-server-dev
mailing list