Spray only supports extracting ONE header with a given name via headerValueByName. How could I get hold of ALL headers with the name "whatever" in the below Spray code snippet? There gotta be some way of extracting the headers!?
lazy val myRoute = {
path("hello") {
post {
headerValueByName("whatever") { header =>
}
}
}
}
There's no predefined directive for that case (yet?). Here's a way to define it yourself: