A Processor is a function that is applied with the HttpRequest and returns a Future of a HttpResponse.
A Processor is a function that is applied with the HttpRequest and returns a Future of a HttpResponse. The HttpResponse (response) that is returned will be returned to the user if the status code is non zero.
The function returns a response, rather than a modified HttpRequest, because we want to allow the DSL to return responses that do not require the exchange to be wrapped. Eg,
someprocessor { req => "literal string" }
If the Processor was HttpRequest => HttpRequest (or some other container class) then the final processor would need to be something like:
someprocessor { req => req withResponse "literal string" }
Which is just ugly, and more hassle.