I'm searching for an asynchronous HTTP parsing/rendering library that can be hooked up to a stream of bytes (i.e. does not depend on direct socket access and does not create / expect actual network connections).
Basically given a stream of bytes I want to be able to parse a HTTP request from it, potentially manipulate something and render it to a byte string. Both for requests and responses. Ideally for strict and chunked requests.
In principal a manipulating Http proxy that works on input streams, java streams, reactive streams or something similar (client & server).
something like this:
stream of bytes <-> HttpLib <-> customCode <-> HttpLib <-> stream of bytes
so far I looked at
Any suggestions are welcome!
Update
Regarding Akka HTTP: I mean the onUpstreamFailure behavior, which is handled directly in the serverLayer blueprint. I guess that's the most efficient / convenient default but how could streams stages after the serverLayer react to such errors (optionally) propagating the error would be more flexible.
-> Bytes -> serverLayer -> customCode
|
<- (error response)
In case somebody stumbles across the question