Which library should I use to parse HTTP requests from a socket stream? I wish I could give a lazy ByteString that can contain partial or multiple HTTP requests.
I'm also interested in something similar for responding to HTTP requests (pass it a response object and get a lazy ByteString to write to the socket)
Edited to add additional information : This interface would be ideal, but, of course, was not required:
ByteString {- the initial buffer -} -> (Maybe Request, ByteString {- remaining buffer -})
In the case of a partial request, the Maybe request does not matter, and the ByteString matches the input.
Thank: -)
source
share