Sure `RawHeader.create` exists:
https://github.com/akka/akka-http/blob/master/akka-http-core/src/main/java/akka/http/javadsl/model/headers/RawHeader.java#L11
Otherwise we would not have been able to release these docs - they've
compiled and validated and only then we release :)

You seem to be mixing up javadsl and scaladsl?
Stick to the language you're using: java docs + all clases from javadsl or
the opposite.

Happy hakking.

-- 
Konrad `ktoso` Malawski
Akka <http://akka.io> @ Lightbend <http://lightbend.com>

On 6 January 2017 at 01:56:16, Alan Burlison ([email protected])
wrote:

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.

-- 
>>>>>>>>>>      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.

Reply via email to