Our service is doing something like this:
pathPrefix("getValue") {
val response = Http().singleRequest(HttpRequest(uri = "https://google.com"))
onSuccess(response) { response =>
conditional(response.header[ETag].map(_.etag), lastModified = None) {
complete {
response
}
}
}
}
We need to send the request to the downstream service to figure out the etag - and on success path the downstream response is a significant portion of our service response.