Sending outbound HTTP request from Akka / Scala

2019-07-07 04:51发布

问题:

I know how to handle incoming http requests in Akka, but I want my Akka-based web app also to communicate with Facebook and CouchDB through HTTP APIs by sending outbound calls. Is there any good practice of this? Should calls be async?

回答1:

For Couch Debasish has SCouchDB: https://github.com/debasishg/scouchdb

As for speaking with Facebook, I do not know, but if you want to do async http outbound calls you can try: https://github.com/AsyncHttpClient/async-http-client

Does that help?



回答2:

A little while back, I posted a sample WebGL app using Akka talking to Facebook and Google Maps. It's nothing special, but it may help. You can find it here: https://github.com/dsciamma/fbgl1