<div dir="ltr">I'm glad we can start talking in source code now. Chris sent me the link before, so I had time to create a counterproposal concerning the 3 files mentioned. In the readme I have the rationale for the design decisions. I also used jazzy to create an API reference. Here are the links:<br><div><br></div><div><a href="https://github.com/paulofaria/http-api-proposal">https://github.com/paulofaria/http-api-proposal</a><br></div><div><a href="https://paulofaria.github.io/http-api-proposal/">https://paulofaria.github.io/http-api-proposal/</a></div><div><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On 26 May 2017 at 13:00, Chris Bailey via swift-server-dev <span dir="ltr"><<a href="mailto:swift-server-dev@swift.org" target="_blank">swift-server-dev@swift.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><font size="2" face="sans-serif">There's been a lot of discussion around
the HTTP API spec originally created by Johannes Weiss with input of a
number of other people (particularly Helga Hess):</font>
<br><font size="2" face="sans-serif"> </font><a href="https://lists.swift.org/pipermail/swift-server-dev/Week-of-Mon-20170403/000422.html" target="_blank"><font size="2" color="blue" face="sans-serif">https://lists.swift.org/<wbr>pipermail/swift-server-dev/<wbr>Week-of-Mon-20170403/000422.<wbr>html</font></a>
<br>
<br><font size="2" face="sans-serif">Since then some work has been done by
Carl Brown and others on a prototype of a clean (not derived from existing
code) implementation of that API. You can find that prototype here:
</font><a href="https://github.com/carlbrown/HTTPSketch" target="_blank"><font size="2" color="blue" face="sans-serif">https://github.com/carlbrown/<wbr>HTTPSketch</font></a>
<br>
<br><font size="2" face="sans-serif">The API itself is essentially implemented
in three files:</font>
<br><font size="2" face="sans-serif">HTTPRequest: </font><a href="https://github.com/carlbrown/HTTPSketch/blob/master/Sources/HTTPSketch/HTTPRequest.swift" target="_blank"><font size="2" color="blue" face="sans-serif">https://github.com/carlbrown/<wbr>HTTPSketch/blob/master/<wbr>Sources/HTTPSketch/<wbr>HTTPRequest.swift</font></a>
<br><font size="2" face="sans-serif">HTTPResponse: </font><a href="https://github.com/carlbrown/HTTPSketch/blob/master/Sources/HTTPSketch/HTTPResponse.swift" target="_blank"><font size="2" color="blue" face="sans-serif">https://github.com/carlbrown/<wbr>HTTPSketch/blob/master/<wbr>Sources/HTTPSketch/<wbr>HTTPResponse.swift</font></a>
<br>
<br><font size="2" face="sans-serif">HTTPCommon: </font><a href="https://github.com/carlbrown/HTTPSketch/blob/master/Sources/HTTPSketch/HTTPCommon.swift" target="_blank"><font size="2" color="blue" face="sans-serif">https://github.com/carlbrown/<wbr>HTTPSketch/blob/master/<wbr>Sources/HTTPSketch/HTTPCommon.<wbr>swift</font></a>
<br>
<br><font size="2" face="sans-serif">The prototype has some dependencies
on the CHTTParser and BlueSocket libraries from IBM-Swift in order to have
working implementation, but we've attempted to abstract those away so that
they're easily replaced with another implementation - eventually the aim
is to move to standard implementations from the Server API project and
to utilise the secure transport implementation being worked on under the
Security stream.</font>
<br>
<br><font size="2" face="sans-serif">We're proposing to use this as the starting
point and move it into the swift-server org on GitHub. From there we can
then collaborate and iterate on improving/evolving the API surface and
the implementation through discussion on the mailing list and PRs.</font>
<br>
<br><font size="2" face="sans-serif">The hope is that having an independent
concrete implementation should make it much easier for us to iterate on
and experiment with changes to the API and implementation as can all see
how it affects a real implementation, including being able to assess performance
and memory footprint costs of alternative approaches, etc. </font>
<br>
<br><font size="2" face="sans-serif">Please take a look. If people are happy
to use this as an initial implementation of HTTP API spec that's been layed
out so far, we'll move it over to the swift-server org on GitHub. This
is by no means the final API or implementation - there's definitely lots
that still needs to be discussed. Once its on the swift-server org we'll
start looking at the API and implementation choices in-depth via the mailing
list and PRs.</font>
<br>
<br><font size="2" face="sans-serif">Chris<br>
Unless stated otherwise above:<br>
IBM United Kingdom Limited - Registered in England and Wales with number
741598. <br>
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6
3AU<br>
</font><br>______________________________<wbr>_________________<br>
swift-server-dev mailing list<br>
<a href="mailto:swift-server-dev@swift.org">swift-server-dev@swift.org</a><br>
<a href="https://lists.swift.org/mailman/listinfo/swift-server-dev" rel="noreferrer" target="_blank">https://lists.swift.org/<wbr>mailman/listinfo/swift-server-<wbr>dev</a><br>
<br></blockquote></div><br></div>