From
http://doc.akka.io/docs/akka-http/current/java/http/routing-dsl/directives/respond-with-directives/respondWithHeader.html
final Route route = path("foo", () ->
respondWithHeader(RawHeader.create("Funky-Muppet", "gonzo"), () ->
complete("beep")));
That doesn't look like valid syntax and there's no create() method on
RawHeader as far as I can tell, but even with that cleaned up:
val route = path("foo", () ->
respondWithHeader(RawHeader("Funky-Muppet", "gonzo"), () ->
complete("beep")));
too many arguments (2) for method path: (pm:
akka.http.scaladsl.server.PathMatcher[L])akka.http.scaladsl.server.Directive[L]
val route1 = path("foo", () ->
The "() ->" idiom that I've also seen elsewhere in the documentation
doesn't seem to work?
If I want to chain together respondWithHeader() and complete(), what's
the correct idiom?
Thanks,
--
Alan Burlison
--
--
Read the docs: http://akka.io/docs/
Check the FAQ: http://doc.akka.io/docs/akka/current/additional/faq.html
Search the archives: https://groups.google.com/group/akka-user
---
You received this message because you are subscribed to the Google Groups "Akka User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.