If you start 
from 
http://doc.akka.io/docs/akka-http/current/scala/http/client-side/request-level.html#request-level-api
 
you just need to modify the preStart method as follows:

  override def preStart() = {
    http.singleRequest(HttpRequest(uri = "http://me.com/aForm";, method = 
HttpMethods.POST,
      entity = FormData(Map("foo" -> "bar")).toEntity)).pipeTo(self)
  }

If you need more advanced features, like sending binary data or streaming 
files from local disk you should take a look at Multipart.FormData.

cheers,
Rafał

W dniu środa, 14 grudnia 2016 13:18:07 UTC+1 użytkownik oxbow_lakes napisał:
>
> There's not one example in the docs that I can see of making a post 
> request. How do I submit a simple form to the URL http://me.com/aForm 
>  with a single form field called "foo" which takes the value "bar"?
>
> Chris
>

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