Hi Dimas You should take a look how HttpEntities work: http://doc.akka.io/docs/akka-stream-and-http-experimental/1.0-RC3/scala/http/common/http-model.html#httpentity
For Chunked entities you can get the Source[ByteString] of the underlying request body. In fact you *must* consume this Source no matter what (if nothing else, by attaching a Sink.igore) otherwise the TCP connection can not progress (Akka Http is streaming directly from TCP the body bytes and backpressures TCP according to the consumption rate). On Fri, May 22, 2015 at 12:02 PM, Dimas Shahtarin <[email protected] > wrote: > Hello. Case is looks like I have a big file on some server. And I want to > handle it without saving. I need to send cookies and a filled form to get > file. Then file will be parsed line by line. > So, in my mind it looks like Flow[HttpRequest, Source[ByteString], _] > > First of all, I couldn't find some partly realized flows like > Flow[HttpRequest, T, _] (i try to find it near incomingConnection), with > that I have a question: should I make hard-coded HttpRequest or I think in > the wrong direction =) > I am not sure what you mean here. The incoming connection in an HTTP server must be handled by a Flow[HttpRequest, HttpResponse] since an HTTP server always emits http responses to http requests. You might want to look at the Routing DSL on top of the low level HTTP API, you might not need to touch streams too much in the end: http://doc.akka.io/docs/akka-stream-and-http-experimental/1.0-RC3/scala/http/routing-dsl/index.html -Endre > In second, is this a good solution to get from flow a new Source? Or maybe > i missed some pattern for this task? > > Thanks. > > P.S. sorry for bad english > > -- > >>>>>>>>>> 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 http://groups.google.com/group/akka-user. > For more options, visit https://groups.google.com/d/optout. > -- Akka Team Typesafe - Reactive apps on the JVM Blog: letitcrash.com Twitter: @akkateam -- >>>>>>>>>> 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 http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.
