Hello could somebody give me a start on how to parse the HTTP-protocol with scala 2.8 packrat-parsing?
I need to parse attached examplary HTTP Response into
- ResponseStatusCode:Int
- Headers:List[(String,String)]
- Body: String, Array[Byte], CharBuffer or whatever
Short examplary usage of a Packrat-Parser very much appreciated. Thanks!
HTTP/1.1·200·OK(CR)(LF)
Date:·Thu,·27·May·2010·12:18:48·GMT(CR)(LF)
Server:·Apache(CR)(LF)
Vary:·Accept-Encoding,User-Agent(CR)(LF)
Connection:·close(CR)(LF)
Transfer-Encoding:·chunked(CR)(LF)
Content-Type:·text/html;·charset=utf-8(CR)(LF)
(CR)(LF)
... Hello World ..