Is there any simple http response parser implementation?
The idea is to put in the complete response as one big string and be able to retrieve stuff like statuscode, body etc. through the interface.
The requests/responses are not sent directly over TCP/IP so there is no need for anything but the core rfc 2616 parsing implementation.
If you use for instance
Apache HttpClientyou will get a java response object which you can use to extract headers or the message body. Consider the following sampleIf you only want to parse a reponse, perhaps the
HttpMessageParserwill be useful: