0

I have an assignment in a discipline from my graduation course where I have to communicate with a server. I am allowed to do that in any language, so I chose Scala. I only receive the port that I am supposed to do that, which is 127.0.0.1:50200.

I would like to know how would I make that connection in Scala. Is it a library or something built in already in the language? I know it is probably really simple, but I have never done something like this.

Ps.: Note that the server is an application that is running on my computer.

lhahn
  • 1,241
  • 2
  • 14
  • 40
  • 1
    This should get you started with connecting through a socket in Scala: [Scala equivalent of python echo server/client example?](http://stackoverflow.com/a/6416755/660848). – wonderb0lt Apr 27 '15 at 16:42

1 Answers1

2

What you need is an HTTP client; you could try to use TCP and deal with the low-level details of the protocol or you could use any of the libraries that are at this link: https://github.com/lauris/awesome-scala#http

I personally like spray-client, which is also quite well-documented.

Aldo Stracquadanio
  • 6,167
  • 1
  • 23
  • 34