I am trying to issue a simple POST request to a webservice which returns some XML in Scala.
It seems that Dispatch is the standard library used for this task, but I cannot find documentation for it. The main site, which I link above, explains at length what is a promise and how to do asynchronous programming, but does not actually document the API. There is a periodic table – which looks a bit scary – but it only seems useful to people who already know what to do and only need a reminder for the cryptic syntax.
It also seems that Scalaz has some facility for HTTP, but I cannot find any documentation for it either.
I use the following: https://github.com/scalaj/scalaj-http.
Here’s a simple GET request:
and an example of a POST:
Scalaj HTTP is available through SBT: