[akka-user] Re: Akka http - complete with headers

2015-03-12 Thread Giovanni Alberto Caporaletti
oh! That was it! thanks ;) I'll remember to check if they add it to the documentation once it's released. Cheers G On Thursday, 12 March 2015 10:00:46 UTC, Mark Hatton wrote: > > Completing a route with a Tuple3[StatusCode, Seq[HttpHeader], T] doesn't >> seem to work for me. > > > Ensure yo

[akka-user] Re: Akka http - complete with headers

2015-03-12 Thread Mark Hatton
> > Completing a route with a Tuple3[StatusCode, Seq[HttpHeader], T] doesn't > seem to work for me. Ensure your headers collection is an instance of immutable.Seq. E.g.: import collection.immutable._ complete( (OK, Seq(`Cache-Control`(`no-cache`)), responseEntity) ) Works for me. Mark

[akka-user] Re: Akka http - complete with headers

2015-03-11 Thread Giovanni Alberto Caporaletti
This is what I came up with (I have another question below): def onSuccessHead(magnet: OnStreamSuccessHeadMagnet): Directive[magnet.Out] = { magnet.directive } trait OnStreamSuccessHeadMagnet { type Out def directive: Directive[Out] } object OnStreamSuccessHeadMagnet { import akka.http.s